简体   繁体   中英

NGINX reverse proxy change port 80 to 8080

I am trying to install and configure Varnish 3 on Centos 6.6

The problem is Nginx is running as reverse proxy on ports 80 and 8080. Apache is running on port 7080

I did all the changes in conf files of nginx however it is still listening on ports 80 and 8080 that's why varnish is not working.

How can I change the nginx port from 80 to 8080?

netstat -tulpn gives the following: (the x are the ip address of the server)

tcp 0 0 xx.xxx.xx.xx:80 0.0.0.0:* LISTEN 17048/nginx tcp 0 0 xx.xxx.xx.xx:8080 0.0.0.0:* LISTEN 17048/nginx

Edit the file /etc/nginx/sites-enabled/default or wherever your listen directive is:

https://stackoverflow.com/a/12800469

Then restart server!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM