Jump to content

Virtual Server Issues


Recommended Posts

Trying to get Virtual Servers working bassed on Name.  Have done this in the past on Windows systems and using Sambar which uses a vhot file with similar syntax.  no matter which domain I go to I get the general web site information

 

My syntax is as follows

 

NameVirtualHost *:80

<VirtualHost www.orilliawomenslacrosse.com>

DocumentRoot /var/www/lax/html/

serverName www.orilliawomenslacrosse.com

ServerSignature email

DirectoryIndex index.php index.html index.htm index.shtml

</VirtualHost>

 

# Virtual host Virtual Host 1

<VirtualHost www.thehdog.com>

DocumentRoot /var/www/html/hdog

ServerName www.thehdog.com

ServerSignature email

DirectoryIndex index.html index.htm index.shtml

</VirtualHost>

 

<Directory "/">

        Options FollowSymLinks

       

        AllowOverride None

       

       

       

</Directory>

 

<Directory "/var/www/html">

        Options Indexes Includes FollowSymLinks

        AllowOverride None

        Allow from all

        Order allow,deny

</Directory>

 

<Directory "/var/www/icons">

        Options Indexes MultiViews

        AllowOverride None

        Allow from all

        Order allow,deny

</Directory>

 

<Directory "/var/www/cgi-bin">

        Options ExecCGI

        AllowOverride None

        Allow from all

        Order allow,deny

</Directory>

<Directory> "/var/www/lax/html">

        Options Indexes Includes FollowSymLinks

        AllowOverride None

        Allow from all

        Order allow,deny

</Directory>

<Directory "DocumentRoot /var/www/html/hdog">

Options Indexes Includes FollowSymLinks

        AllowOverride None

        Allow from all

        Order allow,deny

</Directory>

Link to comment
Share on other sites

It should be like this:

 

NameVirtualHost *:80
<VirtualHost *:80>
    DocumentRoot /var/www/lax/html/ 
    ServerName www.orilliawomenslacrosse.com
    ServerSignature On
    DirectoryIndex index.php index.html index.htm index.shtml 
</VirtualHost>

<VirtualHost *:80>
    DocumentRoot /var/www/html/hdog 
    ServerName www.thehdog.com
    ServerSignature On
    DirectoryIndex index.html index.htm index.shtml 
</VirtualHost>

 

Also note: you placed <Directory /> outside of VirtualHost's. These <Directory> code should be contained within the relevant <VirtualHost> tags.

 

-steve

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.