Sometimes we want to use nginx and apache together. nginx accepts user requests and serves as the request forwarding server, and apache serves as the back-end server.
The configuration is as follows (Recommended learning: nginx tutorial)
Forward the request from port 80 to port 8000 in nginx
apache configuration
httpd.conf Listening to port 8000
Configuration file in the vhosts directory, port 8000 is still configured here
The above is the detailed content of Do Apache and nginx need to be used together?. For more information, please follow other related articles on the PHP Chinese website!