nginx 和 apache 服务器

nginx 和 apache 服务器

我的网站是使用 django 在 apache 服务器上构建的,我想安装 nginx 来提供静态文件服务。你认为如果我将 nginx 放在端口 80 上并将请求代理到 apache,或者将 apache 放在端口 80 上并将请求代理到 nginx,会有什么显著区别吗?我之所以问这个问题,是因为我宁愿将 apache 放在 80 上,因为我的 Web 服务器上有 cpanel,更改 apache 端口会更复杂。

答案1

在您的主接口上创建一个 IP 别名,将 httpd 绑定到主地址,并将 nginx 绑定到别名地址。

相关内容