Results 1 to 2 of 2

Thread: two domains with apache2

  1. #1
    Join Date
    Sep 2010
    Beans
    1

    Unhappy two domains with apache2

    Hi, I have to host two domains in one server, I have done this before in other machines. I use to configure bind9 zones and apache, using servername. This time this does not work.

    I have www.example1.com and www.example2.com

    Their document root for each domain is /var/www/example1 and /var/www/example2

    their public ip is 190.10.X.Y

    When I enter www.example1.com all runs fine, but when I type www.example2.com in the web browser it redirects me to http://190.10.X.Y/example2...and obviously thats not what I want...

    Please help!

  2. #2
    Join Date
    Feb 2010
    Location
    Pittsburgh, PA, USA
    Beans
    219
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: two domains with apache2

    what is in your sites-enabled file? It should look something like this:
    Code:
    <VirtualHost *>
    ServerName example1.com
    ServerAdmin webmaster@host.foo.com
    DocumentRoot /www/docs/example1.com
    </VirtualHost>
    <VirtualHost *>
    ServerName example2.com
    ServerAdmin webmaster@host.foo.com
    DocumentRoot /www/docs/example2.com
    </VirtualHost>
    this may also help: http://httpd.apache.org/docs/1.3/vhosts/name-based.html
    When people ask me what my most valuable trait is, I tell them that it is the ability to do a Google search.
    CMU ECE Class of 2015

Tags for this Thread

Bookmarks

Posting Permissions

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