If you browse http://Ip-Address, what should you see?

severian37

Registered
Nov 7, 2006
2
0
151
If you browse http://Ip-Address/~virthost, what should you see?

If you have a CPanel server with all VirtualHosts set up in httpd.conf as:

<VirtualHost xx.xx.xx.xx>
ServerAlias myclientsite.com
ServerAdmin [email protected]
DocumentRoot /home/myclientsite/public_html
BytesLog domlogs/myclientsite.com-bytes_log
ServerName www.myclientsite.com
User myclientsite
Group myclientsite
CustomLog /usr/local/apache/domlogs/myclientsite.com combined
ScriptAlias /cgi-bin/ /home/myclientsite/public_html/cgi-bin/
</VirtualHost>

The global ServerName in httpd.conf is not set. Hostname is defined as severian.mycpanel.com.

Now, if I browse from a computer to http://my.ip.add.ress/~myscliensite, it takes me to the first entry in Virtual Hosts (whose account is actually suspended) as follows:
http://www.myfirstvirtualhostsite.com/~myclientsite/ while it displays the correct client site in the browser.

My question is ..what makes the ServerName resolve to the first VirtualHost site ?


The reason this is even coming up is because I tweaked security for open_base and saw while developing the site and going through http://my.ip.add.ress/~myscliensite I was getting open_base dir errors because it was pointing to /myfirstvirtualhostsite/public_html.

:confused:
 
Last edited: