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!