cacathcart

Member
Sep 8, 2003
12
0
151
I recently migrated my client accounts to a new server. When you go to the IP address using a web browser, instead of showing my server site or a cPanel default page, one of my clients accounts is showing up. I was told I needed to create a new virtual host, but I am not sure how to do this. Help!
 

dalem

Well-Known Member
PartnerNOC
Oct 24, 2003
2,977
152
368
SLC
cPanel Access Level
DataCenter Provider
SSH into your server

nano /usr/local/apache/conf/httpd.conf

do a search for the domain thats showing up (using ctrl w)

and add the text in red adding your ip to it should look closley to below then restart apache and it will show the default page


NameVirtualHost yourip:80


<VirtualHost yourip>
BytesLog domlogs/your.hostname.com-bytes_log
ServerName your.hostname.com
DocumentRoot /usr/local/apache/htdocs
</VirtualHost>


<VirtualHost yourip>
ServerAlias domain.com
ServerAdmin [email protected]
DocumentRoot /home/username/public_html
BytesLog domlogs/domain.com-bytes_log
User username
Group username
ServerName www.domain.com

User username
Group username
CustomLog /usr/local/apache/domlogs/domain.com combined
ScriptAlias /cgi-bin/ /home/username/public_html/cgi-bin/
</VirtualHost>