Community Forums
Connect with us on LinkedIn
Community Notice
+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    Member
    Join Date
    Sep 2003
    Posts
    12

    Default Creating a new virtual host

    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!

  2. #2
    cPanel Partner NOC cPanel Partner NOC Badge
    Join Date
    Oct 2003
    Posts
    1,914

    Default

    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 webmaster@domain.com
    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>
    Lowest Host/Empire Technology LLC
    Affordable hosting solutions http://empire-hosting.net
    List Your hosting site FREE in http://hostgeneration.com

  3. #3
    Member
    Join Date
    Sep 2003
    Posts
    12

    Default Thank you!

    That worked perfectly. Thank you so much!

Similar Threads & Tags
Similar threads

  1. virtual host directive help please!
    By sifuhall in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 01-22-2010, 09:05 AM
  2. Virtual host
    By pinehead in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 06-11-2007, 10:56 PM
  3. Apache 2... Virtual Host
    By jaymc in forum cPanel and WHM Discussions
    Replies: 6
    Last Post: 01-05-2006, 01:22 PM
  4. Virtual Host
    By zaqizaba in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 06-20-2005, 12:18 PM
  5. mailman & virtual host
    By newfield in forum cPanel and WHM Discussions
    Replies: 8
    Last Post: 06-20-2002, 09:13 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube