The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > OS Specific Forums > Linux
Google UNIX.COM


Linux RedHat, Ubuntu, SUSE, Fedora, Debian, Mandriva, Slackware, Gentoo linux, PCLinuxOS. All Linux questions here!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Application & Virtual hosts in Apache moe2266 UNIX for Dummies Questions & Answers 0 10-16-2007 10:12 AM
Apache Virtual host question moe2266 UNIX for Advanced & Expert Users 1 09-09-2007 10:38 PM
Apache not logging virtual domain fire>ant> UNIX for Dummies Questions & Answers 2 04-13-2005 04:05 AM
Apache 2 Virtual Hosts not resolving ezekiel61 UNIX for Advanced & Expert Users 2 08-20-2004 08:33 AM
Apache virtual host 98_1LE UNIX for Dummies Questions & Answers 4 12-11-2001 02:23 PM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-05-2008
Registered User
 

Join Date: Feb 2008
Posts: 1
Stumble this Post!
Apache Virtual Server Help

Hi
I am trying to configure virtual host on apache and I am running into a problem where the server defaults to the default location and I cannot get apache to pull from the second server.
  • I have configured 2 files in vhosts.d folder
  • I have added NameVirtualHost *.80 to the httpd.conf
  • I have entries in the /etc/hosts file for the 2 servers



apache2ctl - S results are below:

VirtualHost configuration:
wildcard NameVirtualHosts and _default_ servers:
*:80 is a NameVirtualHost
default server www.a.com (/etc/apache2/vhosts.d/01.a.conf:1)
port 80 namevhost www.a.com (/etc/apache2/vhosts.d/01.a.conf:1)
port 80 namevhost www.b.com (/etc/apache2/vhosts.d/02.b.conf:1)
Syntax OK


My first conf file in vhosts.d folder is :
01.a.conf
<VirtualHost *:80>
ServerName www.a.com
DocumentRoot /srv/www/htdocs
ServerAlias a.com www.a.com
ServerAdmin a@a.com
<Directory /srv/www/htdocs>
AllowOverride None
Order allow,deny
Allow from all
</Directory>
ScriptAlias /cgi-bin/ /srv/www/cgi-bin
<Directory /srv/www/cgi-bin>
AllowOverride None
Options +ExecCGI -Includes
Order allow,deny
Allow from all
</Directory>
</VirtualHost>


File 2
02.b.conf
<VirtualHost *:80>
DocumentRoot /srv/www/htdocs/b
ServerName www.b.com
ServerAlias www.b.info www.b.org b.com
ServerAdmin b@b.com
<Directory /srv/www/htdocs/b>
AllowOverride None
Order allow,deny
Allow from all
</Directory>
ScriptAlias /cgi-bin/ /srv/www/cgi-bin
<Directory /srv/www/cgi-bin>
AllowOverride None
Options +ExecCGI -Includes
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
Reply With Quote
Google The UNIX and Linux Forums
Forum Sponsor
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 01:06 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0