I have installed centos 7 and cpanel to server. If I change port 80 (Home »Server Configuration »Tweak Settings »System: Apache non-SSL IP/port) to 8080 and restart httpd, after that http address redirect always to cpanel default page http://domain.com/cgi-sys/defaultwebpage.cgi ? HTTPS works without issues so it goes https://domain.com/.
How fix this redirect problem for http if port is 8080? Port 8080 is for Varnish Cache software.
How fix this redirect problem for http if port is 8080? Port 8080 is for Varnish Cache software.
Code:
<VirtualHost ip_address:8080>
ServerName domain.com
<IfModule rewrite_module>
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/\.well-known/(pki-validation|cpanel-dcv)/
RewriteRule ^ - [END]
RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
</IfModule>
ServerAlias mail.domain.com www.domain.com
DocumentRoot /home/user/public_html
ServerAdmin [email protected]
UseCanonicalName Off