我想更改Apache的端口,以便我可以使用NGINx作为侦听端口80的反向代理。
我将/etc/httpd/conf/httpd.conf文件中的Listen 0.0.0.0:80
和Listen [::]:80
行更改为Listen 0.0.0.0:8090
和Listen [::]:8090
,当我运行{{1 }然后sudo service httpd restart
它说:
sudo service httpd status
我还需要在httpd.conf文件中进行哪些更改?
我的NGINx配置文件是
Looking up localhost
Making HTTP connection to localhost
Alert!: Unable to connect to remote host.
lynx: Can't access startfile http://localhost/whm-server-status
在我提供节点应用程序时效果很好但是如果我更改Apache的端口则无法正常工作
修改
我也改变了每一个server{
listen 80;
server_name mywebpage.com;
#access_log off;
#error_log off;
#large_client_header_buffers 4 16k;
#this one is for the node app
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $http_host;
proxy_set_header Connection "";
proxy_pass http://127.0.0.1:8080;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
#this one is for the apache one
location /otherlocation {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $http_host;
proxy_set_header Connection "";
proxy_pass http://127.0.0.1:8090;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
}
,现在它说了
<VirtualHost *:8090>