NGINX APACHE设置

在子域的情况下,我将如何使重写器获得给定子域的所有端口80调用,并将它们重写为HTTPS?

现在,我的设置失败了,因为Apache已经为http://www.site.tld提供了IP:port XXXX:80。

甚至有可能在NGINX http://myothersubdomain.site.tld:80被改写为https://myothersubdomain.site.tld:443 ?

您不能同时将nginx和apache绑定到服务器上的端口80。

如果你想这样做,那么我build议有nginx绑定到端口80,并通过代理到另一个端口上的Apache

在redirect到http:// * url的所有请求到https:// url在nginxconfiguration中设置服务器,如下所示

server { listen 80; server_name myothersubdomain.site.tld; rewrite ^ https://$server_name$request_uri? permanent; } 

将诀窍