<VirtualHost *:80>
...
ProxyPass "/" "http://10.0.1.123/"
...
RewriteRule ^ https://mywebsite.com%{REQUEST_URI} [END,NE,R=permanent]
The ProxyPass
is telling Apache to work as reverse proxy and forward the request to the real server. The RewriteRule
instead is telling Apache to answer the request itself with a redirect to the HTTPS version of the site. Obviously it cannot do both at the same time, so there is a conflict. Please remove Proxy*
rules and keep only the Rewrite*
rules on port 80.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…