The SSL certificate for this virtual server does not match superhost.gr or www.superhost.gr. Instead, it matches the hostnames :

Hello,
when ima trying to validate my virtual server "superhost.gr? iam receiving this

SSL website : The SSL certificate for this virtual server does not match superhost.gr or www.superhost.gr. Instead, it matches the hostnames : Nexus
i don’t know what exactly this mean but if i try to access my personal website as:

http://superhost.gr it loads ok
but instead i try to load it as:

http://nexus.superhost.gr instead of being shown my actual website which is http://superhost.gr iam seeing one of the websites i host which is http://ypsilandio.gr

Now, that i dont have this sub-server why the redirection goes to ypsilandio.gr and not to superhost.gr ?

Could you please help me fix this issue? Why is this happening?

https://www.virtualmin.com/documentation/web/troubleshooting#toc-the-wrong-site-shows-up-V5JtxdKg

Hello Joe,

i read the article you provided to me and here is the output of:

[root@nexus ~]# ifconfig
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10
loop txqueuelen 0 (Local Loopback)
RX packets 55676 bytes 17994948 (17.1 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 55676 bytes 17994948 (17.1 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

venet0: flags=211<UP,BROADCAST,POINTOPOINT,RUNNING,NOARP> mtu 1500
inet 127.0.0.1 netmask 255.255.255.255 broadcast 0.0.0.0 destination 127.0.0.1
inet6 2607:5501:1000:1ef::692c prefixlen 64 scopeid 0x0
inet6 2607:5501:1000:1ef::692b prefixlen 64 scopeid 0x0
unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 txqueuelen 0 (UNSPEC)
RX packets 839868 bytes 230026037 (219.3 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 1094903 bytes 851302782 (811.8 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

venet0:0: flags=211<UP,BROADCAST,POINTOPOINT,RUNNING,NOARP> mtu 1500
inet 104.168.171.101 netmask 255.255.255.255 broadcast 104.168.171.101 destination 104.168.171.101
unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 txqueuelen 0 (UNSPEC)

and also here is th output of grep:

[root@nexus ~]# grep -i ‘<virtualhost’ /etc/httpd/conf/httpd.conf

ports, instead of the default. See also the

definition. These values also provide defaults for

any containers you may define later in the file.

All of these directives may appear inside containers,

If you do not specify an ErrorLog directive within a

logged here. If you do define an error logfile for a

# If you do not define any access logfiles within a <VirtualHost>
# define per-<VirtualHost> access logfiles, transactions will be

<VirtualHost 104.168.171.101:80>
<VirtualHost 104.168.171.101:80>
<VirtualHost 104.168.171.101:443>
<VirtualHost 104.168.171.101:443>
<VirtualHost 104.168.171.101:443>
<VirtualHost 104.168.171.101:80>
<VirtualHost 104.168.171.101:80>
[root@nexus ~]#

i host 4 websites, incliding my own

superhost.gr
varsa.gr
ypsulandio.gr
kidsclubpaidika.gr

but i see only 3 entried of 80 and 443 listening

my VPS server has only 1 ip address which is ‘104.168.171.101’

What else i need to do to find where the problem lies?

That doesn’t contain the info we need to troubleshoot further, but I think it’s just the common problem of having mixed <Virtualhost *:80> and definitions. You must have either all *:80 or ip:80 configuration, or the behavior will be too tricky for mere mortals for figure out. That’s what all that article is about; how can I make the article clearer that your VirtualHosts all need to either be defined by IP:port or by *:port, but not both, and that both results in difficult to reason about behavior? (Behavior that people, including me, interpret as “the wrong site showing up”.)

If you are running Debian or Ubuntu, you’d also want to make sure the default site is disabled:

a2dissite 000-default

A “default” site configured the way the Debian default site is configured does not make sense in a virtual hosting environment.

I’am searching ‘httpd.conf’ to see if wild character ‘*’ is being used but i can only detect IP:80 configurations. Here:

[root@nexus ~]# grep -i '<virtualhost' /etc/httpd/conf/httpd.conf # ports, instead of the default. See also the # definition. These values also provide defaults for # any containers you may define later in the file. # All of these directives may appear inside containers, # If you do not specify an ErrorLog directive within a # logged here. If you *do* define an error logfile for a # If you do not define any access logfiles within a # define per- access logfiles, transactions will be [root@nexus ~]#

Shall i attach or post the entire ‘httpd.conf’ file ?!

Here it is if its of any help.

https://drive.google.com/open?id=0B_EoOHZ4YAJ1SVhWRE50TjM4UWc

Oh, I don’t think that’s anything to do with Apache config. I just clicked on the problem site link, and it redirects to your other site. Some kind of htaccess rule, maybe?

This is the response from the server for nexus.superhost.gr:

301 Moved Permanently
Location: http://ypsilandio.gr/

You’d have to go well out of your way to make Virtualmin setup a redirect like that (it can do it, but it won’t happne by accident).