Find the answer to your Linux question:
Results 1 to 2 of 2
Hi all, Iíve been having a lot of trouble getting my Virtual Hosts to work. Currently it just loads the route directory and doesnít go thru to the dir. My ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Mar 2008
    Posts
    1

    Virtual Hosts (apache) Problems


    Hi all,

    Iíve been having a lot of trouble getting my Virtual Hosts to work. Currently it just loads the route directory and doesnít go thru to the dir.

    My conf file can be found here:

    http://www.insidiousfix.net/linuxug/conf.txt

    As far as i can see iíve written my vhís are fine, i have no idea why they arenít loading.

    Iíve had help with some of this but hasnít gone very far, it starting with restarting apache then the vhís wouldnít load. Below is a link to the help ive had:

    [nzlug] Apache Restarting Problems

    Iím completely stuck at the moment. If anyone could help that would be great.

  2. #2
    Linux Engineer jledhead's Avatar
    Join Date
    Oct 2004
    Location
    North Carolina
    Posts
    1,077
    this is what I would do (or what I am doing right now), take note of where you had ip's and look for quotes "" where you didn't have quotes. and then check your error logs:
    Code:
    NameVirtualHost *:80
    #
    # NOTE: NameVirtualHost cannot be used without a port specifier 
    # (e.g. :80) if mod_ssl is being used, due to the nature of the
    # SSL protocol.
    #
    
    #
    # VirtualHost example:
    # Almost any Apache directive may go into a VirtualHost container.
    # The first VirtualHost section is used for requests without a known
    # server name.
    #
    
    # VH1
    <VirtualHost *:80>
        ServerAdmin me@mydomain.co.nz
        DocumentRoot "/var/www/html/mydir1"
        ServerName mydomain1.co.nz
        ServerAlias www.mydomain1.co.nz
    </VirtualHost>
    
    # VH2
    <VirtualHost *:80>
        ServerAdmin me@mydomain.co.nz
        DocumentRoot "/var/www/html/mydir2"
        ServerName mydomain2.co.nz
        ServerAlias www.mydomain2.co.nz
    </VirtualHost>
    
    # VH3
    <VirtualHost *:80>
        ServerAdmin me@mydomain.co.nz
        DocumentRoot "/var/www/html/mydir3"
        ServerName mydomain3.co.nz
        ServerAlias www.mydomain3.co.nz
    </VirtualHost>

Posting Permissions

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