Apache Virtual Server

Discussion in 'Linux Networking' started by Leslie Roger, Jul 21, 2004.

  1. Leslie Roger

    Leslie Roger Guest


    Could anyone help me with apache virtual server? I have setup the server
    with 3 domain mapped to one IP Address. When I browse it only show me the
    main domain web page, the rest goes to default apache page. Could there be
    a problem with the documentroot?

    I would appreciate if someone could give me a sample configuration.


    Leslie Roger, Jul 21, 2004
    1. Advertisements

  2. No, it's almost certainly a problem in the configuration of you
    VirtualHosts. Note: the 'example' configuration in httpd.conf DOES
    work. See the documentation of Apache related to VirtualHosts, what
    you describe is usually due to mixup between IPs and Name based virtua

    Davide Bianchi, Jul 21, 2004
    1. Advertisements

  3. Leslie Roger

    Dan Guest

    Something like the following works for me:

    NameVirtualHost *

    <VirtualHost *>
    ServerName your-domain.com
    ServerAlias www.your-domain.com
    DocumentRoot "/var/www/html/your-domain"

    <Directory "/var/www/html/your-domain">
    Options FollowSymLinks
    AllowOverride None

    Dan, Jul 21, 2004
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.