MyBB Community Forums

Full Version: CentOS VirtualHost overlap issue
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
CentOS VirtualHost overlap issue
I have 2 sites setup with virtual hosting on CentOS 6.3 VPS. Each site has it's on conf file for virtual hosts via: /etc/httpd/conf.d/domain1.com.conf and /etc/httpd/conf.d/domain2.com.conf

and the /etc/httpd/conf/httpd/conf file has: NameVirtualHost 123.123.123.123:80 uncommented and adjusted for server IP.

For this let just assume 123.123.123.123 is my vps IP address since I need to keep the real ip private.

But right now domain 1 has precedence over domain 2 as domain 2 is not being loaded in browser (goes straight to domain 1) which is what I don't want.

When running httpd -D DUMP_VHOSTS I get:
VirtualHost configuration:
123.123.123.123:80     is a NameVirtualHost
         default server domain1.com (/etc/httpd/conf.d/domain1.com.conf:1)
         port 80 namevhost domain1.com (/etc/httpd/conf.d/domain1.com.conf:1)
                 alias www.domain1.com
123.123.123.123:443    domain1.com (/etc/httpd/conf.d/domain1.com.conf:9)
wildcard NameVirtualHosts and _default_ servers:
_default_:443          vps.domain1.com (/etc/httpd/conf.d/ssl.conf:74)
*:80                   domain2.com (/etc/httpd/conf.d/domain2.com.conf:1)
Syntax OK

the tech who did initial server setup has the server IP resolve to it's own directory apart from these domains so essentially there's 3 virtual hosts I suppose. And phpmyadmin resolves to say 123.123.123.123/phpmyadmin. Which is what I wanted (one phpmyadmin for both sites).
Both domains are for forums, domain 1 is nearly a big board and domain 2 will be a brand new forum.

So what could be wrong here that's not allowing domain2 virtual host to work?

I appreciate the help Smile
anyone have this issue before?