I have 6 sites configured on my server and all but one (the one I most need) directs http to https without any issue. I have attached my config files for two sites (the only that doesn't work) and one for a site that does work.
If someone could check the domain yourpps.co.uk to see if the site redirects to HTTPS automatically or goes to http like it does my end on multiple browsers and thus does not show the site to be secure. There's only a blank down for maintenance page on each page right now.
My software configuration is: Operating system Ubuntu Linux 16.04.2 Webmin version 1.844 Usermin version 1.711 Virtualmin version 5.99
yourpps.co.uk config: (does not redirect)
<VirtualHost *:80>
SuexecUserGroup "#1026" "#1026"
ServerName yourpps.co.uk
ServerAlias www.yourpps.co.uk
ServerAlias webmail.yourpps.co.uk
ServerAlias admin.yourpps.co.uk
ServerAlias autoconfig.yourpps.co.uk
ServerAlias autodiscover.yourpps.co.uk
DocumentRoot /home/yourpps.co.uk/public_html
ErrorLog /var/log/virtualmin/yourpps.co.uk_error_log
CustomLog /var/log/virtualmin/yourpps.co.uk_access_log combined
ScriptAlias /cgi-bin/ /home/yourpps.co.uk/cgi-bin/
ScriptAlias /awstats/ /home/yourpps.co.uk/cgi-bin/
ScriptAlias /AutoDiscover/AutoDiscover.xml /home/yourpps.co.uk/cgi-bin/autoconfig.cgi
ScriptAlias /Autodiscover/Autodiscover.xml /home/yourpps.co.uk/cgi-bin/autoconfig.cgi
ScriptAlias /autodiscover/autodiscover.xml /home/yourpps.co.uk/cgi-bin/autoconfig.cgi
DirectoryIndex index.html index.htm index.php index.php4 index.php5
<Directory /home/yourpps.co.uk/public_html>
Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch
allow from all
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
Require all granted
</Directory>
<Directory /home/yourpps.co.uk/cgi-bin>
allow from all
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
Require all granted
</Directory>
RewriteEngine on
RewriteCond %{HTTP_HOST} =webmail.yourpps.co.uk
RewriteRule ^(.*) https://yourpps.co.uk:20000/ [R]
RewriteCond %{HTTP_HOST} =admin.yourpps.co.uk
RewriteRule ^(.*) https://yourpps.co.uk:10000/ [R]
ProxyPassMatch ^/(.*.php(/.*)?)$ fcgi://localhost:8006/home/yourpps.co.uk/public_html/$1
RemoveHandler .php
RemoveHandler .php5
RedirectMatch ^/(?!.well-known)(.*)$ https://yourpps.co.uk/$1
<Files awstats.pl>
AuthName "yourpps.co.uk statistics"
AuthType Basic
AuthUserFile /home/yourpps.co.uk/.awstats-htpasswd
require valid-user
</Files>
Redirect /mail/config-v1.1.xml "/cgi-bin/autoconfig.cgi"
Redirect /.well-known/autoconfig/mail/config-v1.1.xml "/cgi-bin/autoconfig.cgi"
</VirtualHost>
<VirtualHost *:443>
SuexecUserGroup "#1026" "#1026"
ServerName yourpps.co.uk
ServerAlias www.yourpps.co.uk
ServerAlias webmail.yourpps.co.uk
ServerAlias admin.yourpps.co.uk
ServerAlias autoconfig.yourpps.co.uk
ServerAlias autodiscover.yourpps.co.uk
DocumentRoot /home/yourpps.co.uk/public_html
ErrorLog /var/log/virtualmin/yourpps.co.uk_error_log
CustomLog /var/log/virtualmin/yourpps.co.uk_access_log combined
ScriptAlias /cgi-bin/ /home/yourpps.co.uk/cgi-bin/
ScriptAlias /awstats/ /home/yourpps.co.uk/cgi-bin/
ScriptAlias /AutoDiscover/AutoDiscover.xml /home/yourpps.co.uk/cgi-bin/autoconfig.cgi
ScriptAlias /Autodiscover/Autodiscover.xml /home/yourpps.co.uk/cgi-bin/autoconfig.cgi
ScriptAlias /autodiscover/autodiscover.xml /home/yourpps.co.uk/cgi-bin/autoconfig.cgi
DirectoryIndex index.html index.htm index.php index.php4 index.php5
<Directory /home/yourpps.co.uk/public_html>
Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch
allow from all
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
Require all granted
</Directory>
<Directory /home/yourpps.co.uk/cgi-bin>
allow from all
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
Require all granted
</Directory>
RewriteEngine on
RewriteCond %{HTTP_HOST} =webmail.yourpps.co.uk
RewriteRule ^(.*) https://yourpps.co.uk:20000/ [R]
RewriteCond %{HTTP_HOST} =admin.yourpps.co.uk
RewriteRule ^(.*) https://yourpps.co.uk:10000/ [R]
ProxyPassMatch ^/(.*.php(/.*)?)$ fcgi://localhost:8006/home/yourpps.co.uk/public_html/$1
RemoveHandler .php
RemoveHandler .php5
SSLEngine on
SSLCertificateFile /home/yourpps.co.uk/ssl.cert
SSLCertificateKeyFile /home/yourpps.co.uk/ssl.key
SSLProtocol all -SSLv2 -SSLv3 -TLSv1 -TLSv1.1
<Files awstats.pl>
AuthName "yourpps.co.uk statistics"
AuthType Basic
AuthUserFile /home/yourpps.co.uk/.awstats-htpasswd
require valid-user
</Files>
Redirect /mail/config-v1.1.xml /cgi-bin/autoconfig.cgi
Redirect /.well-known/autoconfig/mail/config-v1.1.xml /cgi-bin/autoconfig.cgi
SSLCACertificateFile /home/yourpps.co.uk/ssl.ca
</VirtualHost>
adelphia.co.uk config: (redirects)
<VirtualHost *:80>
SuexecUserGroup "#1023" "#1023"
ServerName adelphia.co.uk
ServerAlias www.adelphia.co.uk
ServerAlias webmail.adelphia.co.uk
ServerAlias admin.adelphia.co.uk
ServerAlias autoconfig.adelphia.co.uk
ServerAlias autodiscover.adelphia.co.uk
DocumentRoot /home/adelphia.co.uk/public_html
ErrorLog /var/log/virtualmin/adelphia.co.uk_error_log
CustomLog /var/log/virtualmin/adelphia.co.uk_access_log combined
ScriptAlias /cgi-bin/ /home/adelphia.co.uk/cgi-bin/
ScriptAlias /awstats/ /home/adelphia.co.uk/cgi-bin/
ScriptAlias /AutoDiscover/AutoDiscover.xml /home/adelphia.co.uk/cgi-bin/autoconfig.cgi
ScriptAlias /Autodiscover/Autodiscover.xml /home/adelphia.co.uk/cgi-bin/autoconfig.cgi
ScriptAlias /autodiscover/autodiscover.xml /home/adelphia.co.uk/cgi-bin/autoconfig.cgi
DirectoryIndex index.html index.htm index.php index.php4 index.php5
<Directory /home/adelphia.co.uk/public_html>
Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch
allow from all
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
Require all granted
</Directory>
<Directory /home/adelphia.co.uk/cgi-bin>
allow from all
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
Require all granted
</Directory>
RewriteEngine on
RewriteCond %{HTTP_HOST} =webmail.adelphia.co.uk
RewriteRule ^(.*) https://adelphia.co.uk:20000/ [R]
RewriteCond %{HTTP_HOST} =admin.adelphia.co.uk
RewriteRule ^(.*) https://adelphia.co.uk:10000/ [R]
ProxyPassMatch ^/(.*.php(/.*)?)$ fcgi://localhost:8003/home/adelphia.co.uk/public_html/$1
RemoveHandler .php
RemoveHandler .php5
RedirectMatch ^/(?!.well-known)(.*)$ https://adelphia.co.uk/$1
<Files awstats.pl>
AuthName "adelphia.co.uk statistics"
AuthType Basic
AuthUserFile /home/adelphia.co.uk/.awstats-htpasswd
require valid-user
</Files>
Redirect /mail/config-v1.1.xml /cgi-bin/autoconfig.cgi
Redirect /.well-known/autoconfig/mail/config-v1.1.xml /cgi-bin/autoconfig.cgi
</VirtualHost>
<VirtualHost *:443>
SuexecUserGroup "#1023" "#1023"
ServerName adelphia.co.uk
ServerAlias www.adelphia.co.uk
ServerAlias webmail.adelphia.co.uk
ServerAlias admin.adelphia.co.uk
ServerAlias autoconfig.adelphia.co.uk
ServerAlias autodiscover.adelphia.co.uk
DocumentRoot /home/adelphia.co.uk/public_html
ErrorLog /var/log/virtualmin/adelphia.co.uk_error_log
CustomLog /var/log/virtualmin/adelphia.co.uk_access_log combined
ScriptAlias /cgi-bin/ /home/adelphia.co.uk/cgi-bin/
ScriptAlias /awstats/ /home/adelphia.co.uk/cgi-bin/
ScriptAlias /AutoDiscover/AutoDiscover.xml /home/adelphia.co.uk/cgi-bin/autoconfig.cgi
ScriptAlias /Autodiscover/Autodiscover.xml /home/adelphia.co.uk/cgi-bin/autoconfig.cgi
ScriptAlias /autodiscover/autodiscover.xml /home/adelphia.co.uk/cgi-bin/autoconfig.cgi
DirectoryIndex index.html index.htm index.php index.php4 index.php5
<Directory /home/adelphia.co.uk/public_html>
Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch
allow from all
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
Require all granted
</Directory>
<Directory /home/adelphia.co.uk/cgi-bin>
allow from all
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
Require all granted
</Directory>
RewriteEngine on
RewriteCond %{HTTP_HOST} =webmail.adelphia.co.uk
RewriteRule ^(.*) https://adelphia.co.uk:20000/ [R]
RewriteCond %{HTTP_HOST} =admin.adelphia.co.uk
RewriteRule ^(.*) https://adelphia.co.uk:10000/ [R]
ProxyPassMatch ^/(.*.php(/.*)?)$ fcgi://localhost:8003/home/adelphia.co.uk/public_html/$1
RemoveHandler .php
RemoveHandler .php5
SSLEngine on
SSLCertificateFile /home/adelphia.co.uk/ssl.cert
SSLCertificateKeyFile /home/adelphia.co.uk/ssl.key
SSLProtocol all -SSLv2 -SSLv3 -TLSv1 -TLSv1.1
<Files awstats.pl>
AuthName "adelphia.co.uk statistics"
AuthType Basic
AuthUserFile /home/adelphia.co.uk/.awstats-htpasswd
require valid-user
</Files>
Redirect /mail/config-v1.1.xml /cgi-bin/autoconfig.cgi
Redirect /.well-known/autoconfig/mail/config-v1.1.xml /cgi-bin/autoconfig.cgi
SSLCACertificateFile /home/adelphia.co.uk/ssl.ca
</VirtualHost>
Thanks in advance
That site redirects to https for me. Perhaps you got it fixed?
--
Check out the forum guidelines!
Yes, I did fix it but have no clue how. All I did was to add my original files (rather than just the Site Offline page, and it worked. Weird but it's working now so this feed can be closed if you wish. I would have posted it was fixed but the original post was one of the those I had to wait for to be published.
Chris: Adelphia Interactive
Desktop: Windows 10 Pro x64
Server: Ubuntu 16.0.4.2LTS
Webmin/Virtualmin: Latest (daily updates)
Yep, if a post has domain names in it, it's highly likely to get flagged. (But, I'll push it out of the queue quickly.)
Glad you got it working.
--
Check out the forum guidelines!
Is there a way to override this flagging? For instance, if I called it blahblah.tld (tld = .co.uk) would that fool it? I notice a lot of people use tld (obviously for top level domain) but I rarely see what the tld stands for.
Chris: Adelphia Interactive
Desktop: Windows 10 Pro x64
Server: Ubuntu 16.0.4.2LTS
Webmin/Virtualmin: Latest (daily updates)