www alias not working

4 posts / 0 new
Last post
#1 Mon, 06/12/2017 - 06:41
adelphia
adelphia's picture

www alias not working

I have created a simple "offline" site which works when calling it without the www alias but whenever I add www it times out.

The site is mybusinessserver.co.uk which works fine, but www.mybusinessserver.co.uk does NOT.

The site is setup to use SSL with Let's Encrypt and the certificate is valid.

Could someone please explain how I can get the www alias to work.

Here is my VirtalHost file for the domain as created by VirtualAdmin (i.i. untouch by me):

<VirtualHost *:80>
SuexecUserGroup "#1002" "#1002"
ServerName mybusinessserver.co.uk
ServerAlias www.mybusinessserver.co.uk
DocumentRoot /home/mybusinessserver.co.uk/public_html
ErrorLog /var/log/virtualmin/mybusinessserver.co.uk_error_log
CustomLog /var/log/virtualmin/mybusinessserver.co.uk_access_log combined
ScriptAlias /cgi-bin/ /home/mybusinessserver.co.uk/cgi-bin/
ScriptAlias /awstats/ /home/mybusinessserver.co.uk/cgi-bin/
DirectoryIndex index.html index.htm index.php
<Directory /home/mybusinessserver.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/mybusinessserver.co.uk/cgi-bin>
allow from all
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
Require all granted
</Directory>
ProxyPassMatch ^/(.*.php(/.*)?)$ fcgi://localhost:8000/home/mybusinessserver.co.uk/public_html/$1
RemoveHandler .php
RemoveHandler .php5
<Files awstats.pl>
AuthName "mybusinessserver.co.uk statistics"
AuthType Basic
AuthUserFile /home/mybusinessserver.co.uk/.awstats-htpasswd
require valid-user
</Files>
</VirtualHost>
<VirtualHost 10.0.64.4:443>
SuexecUserGroup "#1002" "#1002"
ServerName mybusinessserver.co.uk
ServerAlias www.mybusinessserver.co.uk
DocumentRoot /home/mybusinessserver.co.uk/public_html
ErrorLog /var/log/virtualmin/mybusinessserver.co.uk_error_log
CustomLog /var/log/virtualmin/mybusinessserver.co.uk_access_log combined
ScriptAlias /cgi-bin/ /home/mybusinessserver.co.uk/cgi-bin/
ScriptAlias /awstats/ /home/mybusinessserver.co.uk/cgi-bin/
DirectoryIndex index.html index.htm index.php
<Directory /home/mybusinessserver.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/mybusinessserver.co.uk/cgi-bin>
allow from all
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
Require all granted
</Directory>
ProxyPassMatch ^/(.*.php(/.*)?)$ fcgi://localhost:8000/home/mybusinessserver.co.uk/public_html/$1
RemoveHandler .php
RemoveHandler .php5
SSLEngine on
SSLCertificateFile /home/mybusinessserver.co.uk/ssl.cert
SSLCertificateKeyFile /home/mybusinessserver.co.uk/ssl.key
SSLProtocol all -SSLv2 -SSLv3 -TLSv1 -TLSv1.1
<Files awstats.pl>
AuthName "mybusinessserver.co.uk statistics"
AuthType Basic
AuthUserFile /home/mybusinessserver.co.uk/.awstats-htpasswd
require valid-user
</Files>
SSLCACertificateFile /home/mybusinessserver.co.uk/ssl.ca
</VirtualHost>
Mon, 06/12/2017 - 23:19
unborn
unborn's picture

hi, just checked out your site with www.mybus......co.uk and it works, at least I see site offline with apology message. Same message is shown when visiting site without www. Perhaps issue was in your browser?

Configuring/troubleshooting Debian servers is always great fun

Contact me directly ? GPG/PGP supported!

Tue, 06/13/2017 - 00:11
ksihota

I can confirm access using both (it appears to redirect to www)

Maybe a DNS propagation issue?

Tue, 06/13/2017 - 06:29
adelphia
adelphia's picture

Oh, OK. Thank you, I'm guessing it must be something to do with my local DNS then. Well at least this (finally) managed to get it posted (even though I could never see it as posted or got an access denied).

Chris: Adelphia Interactive
Desktop: Windows 10 Pro x64
Server: Ubuntu 16.0.4.2LTS
Webmin/Virtualmin: Latest (daily updates)