Results 1 to 7 of 7
  1. #1
    Join Date
    Apr 2011
    Posts
    56

    Virtual host HTTPD with 2 domains

    Hello I have a vps and I'm currently using Apache as a web server , I have 2 domains and I want to host them both on the same VPS. I dont have nameservers so I'm using A records pointing to the IP of the vps. I added a virtual host at the end of the apache config file like this:
    <VirtualHost 10.1.1.1>
    ServerAdmin ****@gmail.com
    DocumentRoot /home/wwwroot/****
    ServerName abc.com
    ServerAlias abc.com
    ErrorLog logs/abc.com-error_log
    CustomLog logs/abc.com-access_log common
    </VirtualHost>
    But the domains are both pointing to the default directory. How can I solve this? Thank you.

  2. #2
    Join Date
    Dec 2007
    Posts
    471
    http://httpd.apache.org/docs/2.0/vhosts/examples.html

    Posting your actual VirtualHost entries will help more then a generic example.

    What do your logs say?

  3. #3
    Join Date
    Apr 2011
    Posts
    56
    There is nothing regarding the virtual hosts in the logs.

    This is the actual entry:
    NameVirtualHost 10.1.1.1

    <VirtualHost 10.1.1.1>
    ServerAdmin ****@gmail.com
    DocumentRoot /home/wwwroot/
    ServerName 9lol.com
    ServerAlias 9lol.com
    ErrorLog logs/9lol.com-error_log
    CustomLog logs/9lol.com-access_log common
    </VirtualHost>

    <VirtualHost 10.1.1.1>
    ServerAdmin ****@gmail.com
    DocumentRoot /home/wwwroot/politika2
    ServerName embroiderydisplay.com
    ServerAlias embroiderydisplay.com
    ErrorLog logs/embroiderydisplay.com-error_log
    CustomLog logs/embroiderydisplay.com-access_log common
    </VirtualHost>

  4. #4
    Join Date
    Apr 2010
    Location
    North Carolina
    Posts
    442
    Is 10.1.1.1 the IP your server is on?

  5. #5
    Join Date
    Apr 2011
    Posts
    56
    No..........

  6. #6
    Join Date
    Apr 2010
    Location
    North Carolina
    Posts
    442
    Then change it to the server's IP.

  7. #7
    Join Date
    Apr 2011
    Posts
    56
    Yes that solved it Thanks a lot guys.

Similar Threads

  1. httpd down after updating all plesk domains
    By anjanesh in forum Hosting Software and Control Panels
    Replies: 13
    Last Post: 03-01-2008, 03:23 AM
  2. i need httpd and htaccess for my web host.
    By j_miguel_y in forum Web Hosting
    Replies: 3
    Last Post: 11-16-2005, 05:49 PM
  3. Virtual host setup for multiple domains
    By Sillysoft in forum Hosting Security and Technology
    Replies: 4
    Last Post: 03-04-2005, 01:56 AM
  4. Multiple domains on one virtual host
    By jbe in forum Dedicated Server
    Replies: 1
    Last Post: 09-01-2003, 09:36 AM
  5. httpd.conf - Virtual Hosting/Parking/Pointing
    By domingo in forum Hosting Security and Technology
    Replies: 2
    Last Post: 05-31-2003, 11:20 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •