[英]NGINX reverse proxy change port 80 to 8080
I am trying to install and configure Varnish 3 on Centos 6.6 我正在尝试在Centos 6.6上安装和配置Varnish 3
The problem is Nginx is running as reverse proxy on ports 80 and 8080. Apache is running on port 7080 问题是Nginx在端口80和8080上作为反向代理运行。Apache在端口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. 我对nginx的conf文件进行了所有更改,但是它仍在侦听端口80和8080,这就是为什么清漆无法正常工作的原因。
How can I change the nginx port from 80 to 8080? 如何将Nginx端口从80更改为8080?
netstat -tulpn gives the following: (the x are the ip address of the server) netstat -tulpn给出以下内容:(x是服务器的ip地址)
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 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: 编辑文件/ etc / nginx / sites-enabled / default或您的监听指令所在的位置:
https://stackoverflow.com/a/12800469 https://stackoverflow.com/a/12800469
Then restart server! 然后重启服务器!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.