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
https://forums.phpfreaks.com/topic/58136-virtual-server-issues/
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
https://forums.phpfreaks.com/topic/58136-virtual-server-issues/#findComment-288610
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.