我试图将Apache的VirtualHostconfiguration为nginx服务器的反向代理(所有当前的应用程序都使用Apache,而这个新的应用程序正在使用nginx的一些特定function)。 使用configuration:
<VirtualHost ***.***.***.***:80> ServerAdmin **** ServerName **** ProxyRequests Off <Proxy *> Order deny,allow Allow from all </Proxy> ProxyPass / http://localhost:8071/ ProxyPassReverse / http://localhost:8071/ <Location /> Order allow,deny Allow from all </Location> </VirtualHost>
与端口8071上运行的nginx / uwsgi(尝试curl它在服务器上,它的工作)。 但是,Apache仍然拒绝将请求路由到nginx。 有一些特定的设置,我需要更改或其他文件来编辑?
对此的回答非常简单,域名所有者没有将其设置为新的IP地址。 所以,如果你遇到这个问题,考虑运行dig <your-URL>命令。