Wrong website loading

SYSTEM INFORMATION
OS type and version Debian 8
Virtualmin version 7.2-1

I just added a new virtual server, everything seemed to go ok. Although the configuration that was created had syntax errors. It was saying that all options had to start with + or none of them could or something along those lines, I just copied in the options line from a site that was working.
I don’t know if that is related

Anyway, when i try to visit the new site, instead I get a sub-server of the first virtual server in the list.

The apache config looks correct so I don’t know how its ending up in the wrong place

This is the config

SuexecUserGroup "#1016" "#1013"
ServerName sleuthspot.com
ServerAlias www.sleuthspot.com
ServerAlias webmail.sleuthspot.com
ServerAlias admin.sleuthspot.com
DocumentRoot /home/sleuthspot/public_html
ErrorLog /var/log/virtualmin/sleuthspot.com_error_log
CustomLog /var/log/virtualmin/sleuthspot.com_access_log combined
ScriptAlias /cgi-bin/ /home/sleuthspot/cgi-bin/
DirectoryIndex index.html index.htm index.php index.php4 index.php5
<Directory /home/sleuthspot/public_html>
    Options -Indexes +IncludesNOEXEC +FollowSymLinks

    allow from all
    AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
    Require all granted
    AddType application/x-httpd-php .php
    AddHandler fcgid-script .php
    AddHandler fcgid-script .php5
    FCGIWrapper /home/sleuthspot/fcgi-bin/php5.fcgi .php
    FCGIWrapper /home/sleuthspot/fcgi-bin/php5.fcgi .php5
</Directory>
<Directory /home/sleuthspot/cgi-bin>
    allow from all
    Require all granted
    AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
</Directory>
ProxyPass /.well-known !
RewriteEngine on
RewriteCond %{HTTP_HOST} =webmail.sleuthspot.com
RewriteRule ^(?!/.well-known)(.*) https://sleuthspot.com:20000/ [R]
RewriteCond %{HTTP_HOST} =admin.sleuthspot.com
RewriteRule ^(?!/.well-known)(.*) https://sleuthspot.com:10000/ [R]
RemoveHandler .php
RemoveHandler .php5
php_admin_value engine Off
FcgidMaxRequestLen 1073741824
PerlRequire /etc/webmin/virtualmin-google-analytics/apachemod.pl
PerlOutputFilterHandler Virtualmin::GoogleAnalytics

Are you really on Debian 8? It’s been unsupported for three years. Pretty dangerous to be running that on a public server.

The most common source of “wrong site shows up” problems are that you have a mix of * and IP-based virtual hosts, but lately it’s become common for folks to have the same problem caused by having IPv6 enabled, but misconfigured (but I doubt that’s your problem on such an old distro). It’s also pretty common for it to be caused by having SSL enabled for some sites, but not others; most browsers will automatically try SSL first, and if you don’t have an SSL site configured Apache will serve a VirtualHost that does have SSL.

We have a FAQ about some of the causes: Website Troubleshooting – Virtualmin

Yes, I’m really on Debian 8. I wanted to upgrade but it didn’t work and I wanted to migrate to a clean server but the webmin backup failed without any reason so that’s not an option right now until I can figure that out

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.