Find the answer to your Linux question:
Results 1 to 2 of 2
Hello all, I have set up a virtual host for a friend: Code: ############### George Shipilov - Xizor Forum ####################### <VirtualHost *&#58;80> ServerName xizor.r5a.org ServerAlias xizor.r5a.org DocumentRoot /var/www/xizor.r5a.org/public_html ServerAdmin georgeshipilov@hotmail.com ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    r5a
    r5a is offline
    Just Joined!
    Join Date
    Jul 2003
    Location
    Toronto Canada Ont
    Posts
    63

    Apache: Vhost Problem


    Hello all,
    I have set up a virtual host for a friend:
    Code:
    ############### George Shipilov - Xizor Forum #######################
    <VirtualHost *&#58;80>
    ServerName xizor.r5a.org
    ServerAlias xizor.r5a.org
    DocumentRoot /var/www/xizor.r5a.org/public_html
    ServerAdmin georgeshipilov@hotmail.com
    CustomLog /var/www/xizor.r5a.org/logs/access.log combined
    ErrorLog /var/www/xizor.r5a.org/logs/error.log
    <Directory /var/www/xizor.r5a.org/public_html>
    Options FollowSymlinks
    AllowOverride None
    </Directory>
    </VirtualHost>
    His error log shows nothing, but his access log shows this:


    192.168.1.1 - - [02/May/2004:23:36:40 -0400] "GET / HTTP/1.01." 400 1008 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.1.4322)"
    I have also set this:

    Code:
    #
    # Use name-based virtual hosting.
    #
    NameVirtualHost *
    The error that comes up when I try to go to xizor.r5a.org:
    Bad request!
    Your browser (or proxy) sent a request that this server could not understand.
    If you think this is a server error, please contact the webmaster
    Error 400
    xizor.r5a.org
    Sun 02 May 2004 11:50:23 PM EDT
    Apache/2.0.40 (Red Hat Linux)
    I also get the same error when trying to go to my main site (www.r5a.org)

    I have chowned the entire xizor.r5a.org and files to xizor (local user) and chmodded them to 0755.

    What I have noticed is if I comment the VHOSt for Geroge Shipliov and the Use name-based virtual hosting directive, my site works fine. If I uncomment (enable) my site and his gets the exact same error.

    I have also set these:

    Code:
    ServerName r5a.org&#58;80
    
    #
    # UseCanonicalName&#58; Determines how Apache constructs self-referencing 
    # URLs and the SERVER_NAME and SERVER_PORT variables.
    # When set "Off", Apache will use the Hostname and Port supplied
    # by the client.  When set "On", Apache will use the value of the
    # ServerName directive.
    #
    UseCanonicalName Off
    My DNS records (r5a.org, www.r5a.org, xizor.r5a.org all point to the same IP) since im using 1 IP.

    Any idea whats going on?
    Thanks alot

  2. #2
    Linux User
    Join Date
    Jan 2003
    Location
    Cardiff, Wales
    Posts
    478

    changes

    the virtual host you have is the default one - all names @ port 80.

    you then need to set up each seperate host
    e.g.
    Code:
    <VirtualHost xizor.r5a.org>
    ServerName xizor.r5a.org
    ServerAlias xizor.r5a.org
    DocumentRoot /var/www/xizor.r5a.org/public_html
    ServerAdmin georgeshipilov@hotmail.com
    CustomLog /var/www/xizor.r5a.org/logs/access.log combined
    ErrorLog /var/www/xizor.r5a.org/logs/error.log
    <Directory /var/www/xizor.r5a.org/public_html>
    Options FollowSymlinks
    AllowOverride None
    </Directory>
    </VirtualHost>
    Try that. Remember you will still need some kind of default virtual host as well.
    No trees were harmed during the creation of this message. Its made from a blend of elephant tusk and dolphin meat.

Posting Permissions

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