Have you ever searched where the virtual host of a website is defined in the apache config files? There is a handy option of the apachectl or apache2ctl script which might help then. When you run the command:

apachectl -S

OR: you can run

httpd -S

on the shell, you will get a list of all virtual hosts and default servers included. the line number where it is defined. Example:

VirtualHost configuration:
wildcard NameVirtualHosts and _default_ servers:
*:80                   is a NameVirtualHost
         default server qlsx.nms.ssdc (/etc/httpd/sites-enabled/qlsx.nms.ssdc.conf:1)
         port 80 namevhost qlsx.nms.ssdc (/etc/httpd/sites-enabled/qlsx.nms.ssdc.conf:1)
                 alias www.qlsx.nms.ssdc
*:81                 is a NameVirtualHost
         default server vndemy.com(/etc/httpd/sites-enabled/vndemy.com.conf:10)
         port 81 namevhost vndemy.com (/etc/httpd/sites-enabled/vndemy.com.conf:10)
                 alias www.vndemy.com
Syntax OK

Hope this help!

About The Author