it turns out that there is a php project on the server, and the default port 80 is used. Later, I need to add one. Because all the pages are static,
, I want to directly use ngnix to access it, and then modify the apache2 port of the php project to 808Perspect Nginx listening on port 80,
upstream a_pool{
server 127.0.0.1:8088;
}
upstream b_pool{
server 127.0.0.1:80;
}
server {
listen 80;
server_name a.com;
access_log logs/a.log;
error_log logs/a.error;
-sharpdemo_pool
location / {
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://a_pool;
}
}
server {
listen 80;
server_name b.com;
access_log logs/b.log;
error_log logs/b.error;
-sharpdemo_pool
location / {
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://b_pool;
}
}
this configuration causes both domain names to point to a.com
I want to point to nginx/html/.
port 80 not to forward it.