https not being forced after modifying apache configuration for reverse proxy
The although it partially works. The problem i'm encountering is that it's not forcing https in a lot of instances, and instead pulling an apache error page.
Is my include.conf
files incorrect?
Here is the script I have for it:
ServerAdmin josh@howard.codes
ServerName www.howard.codes
ProxyRequests off
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
<Location />
ProxyPass http://localhost:8080/
ProxyPassReverse http://localhost:8080/
</Location>
-
Hey there! I wouldn't expect the cPanel >> Domains >> "Force HTTPS Redireciton" tool to work in this case, as that gets added to the Apache configuration's vhost for the domain. Here is what that looks inside the Apache configuration on the machine:
<VirtualHost 1.2.3.4:80>
ServerName domain.com
<IfModule rewrite_module>
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/\.well-known/cpanel-dcv/[0-9a-zA-Z_-]+$ [OR]
RewriteCond %{REQUEST_URI} ^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Sectigo\ DCV)?$ [OR]
RewriteCond %{REQUEST_URI} ^/\.well-known/pki-validation/(?:\ Ballot169)? [OR]
RewriteCond %{REQUEST_URI} ^/\.well-known/acme-challenge/[0-9a-zA-Z_-]+$
RewriteRule ^ - [END]
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]Since your tool isn't using the standard ports, the redirection doesn't happen.
Did you manually configure that proxy or was that setup using https://docs.cpanel.net/knowledge-base/web-services/nginx-with-reverse-proxy/. If you're using our implementation of Nginx I'd expect the redirection to work.
0
Please sign in to leave a comment.
Comments
1 comment