1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

apache and vhosting

Discussion in 'Web Hosting' started by pspuria, Jun 21, 2010.

  1. pspuria

    pspuria Newbie

    Joined:
    Jun 18, 2010
    Messages:
    17
    Likes Received:
    0
    Hi everyone,

    I am trying to setup a webserver with multiple websites and i cannot access subdirectories, i am currently running a test server right now with apache 2.2 on winxp and vhosts are not working. Any help would be greatful if you need more info i can do the best i can in answering


    :tumblewee :tumblewee

    mahnah mahnah
     
    Last edited: Jun 21, 2010
  2. sumax

    sumax Junior Member

    Joined:
    Jun 25, 2009
    Messages:
    179
    Likes Received:
    54
    Occupation:
    Programmer
    Location:
    /web/developer
    add this to your httpd.conf

    <VirtualHost 192.168.2.10:80>
    DocumentRoot /var/www/html/domain1.com
    ServerName domain1.com
    ServerAlias domain1.com *.domain1.com
    </VirtualHost>

    <VirtualHost 192.168.2.10:80>
    DocumentRoot /var/www/html/domain2.com
    ServerName domain2.com
    ServerAlias domain2.com *.domain2.com
    </VirtualHost>

    <VirtualHost 192.168.2.10:80>
    DocumentRoot /var/www/html/mail.domain1.com
    ServerName mail.domain1.com
    ServerAlias mail.domain1.com *.mail.domain1.com
    </VirtualHost>


    change
    /var/www/html/
    to your httpd location
     
  3. pspuria

    pspuria Newbie

    Joined:
    Jun 18, 2010
    Messages:
    17
    Likes Received:
    0
    thank you submax, however i found a piece of software that will help me configure vhosts, called apacheconf its gui based and i can run it remotely and within the network of the server