You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Ashutosh Mohanty <as...@syncad.com> on 2006/08/10 10:29:43 UTC
[users@httpd] Virtualhost Problem
Hi Owen Boyle/Everybody,
Thanks to Boyle for his help regarding my previous problem in apache, now I am facing another problem with accessing virtual host in apache here is my description of virtual hosting.
Os: Linux 7.2(2.4.34)
Httpd-2.0.53
Php-5.0.3
I have two Virtual host setting one is for our internal development site (http://laxmi.in.mydomain.com) and another is for our backup strategies maintenance site (http://backup.in.mydomain.com).
The problem I am facing is, out of these two setting, one is working and another one is point the same thing instead of pointing to two separate Directories. Which ever out of these virtual hosts setting comes first in httpd.conf is working and another is pointing the same,
For example according to following setting,
Whenever I access http://laxmi.in.mydomain.com in web browser its show me our internal development site, but http://backup.in.mydomain.com also showing our internal development sites instead of showing backup information.
Could you please help me in this regard,
Advance Thanks:
Ashutosh Mohanty
SynaptiCAD Inc.
<VirtualHost *>
ServerAdmin ashutosh@mydomain.com
DocumentRoot /home/ashutosh/www/www-devel.mydomain.com/html
ServerName laxmi.in.mydomain.com
ServerAlias laxmi.in
ErrorLog /home/ashutosh/www/www-devel.mydomain.com/logs/error_log
CustomLog /home/ashutosh/www/www-devel.mydomain.com/logs/access_log common
ErrorDocument 404 "/cgi-bin/404_handler.pl"
<Directory "/home/ashutosh/www/www-devel.mydomain.com/html">
DirectoryIndex index.htm
RedirectMatch (.*)\.html$ $1.htm
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
<IfModule mod_dav.c>
DAV On
DAVDepthInfinity on
<LimitExcept GET HEAD POST OPTIONS>
AuthUserFile /home/ashutosh/www/www-devel.mydomain.com/htpasswd
AuthName mydomain-www
AuthType Basic
require user mydomain
</LimitExcept>
</IfModule>
</Directory>
<IfModule mod_mime.c>
# Pass all .html documents through PHP 4
AddType text/html .html .htm
AddType application/x-httpd-php .html .htm .php
</IfModule>
<IfModule mod_alias.c>
#
# ScriptAlias: This controls which directories contain server scripts.
# ScriptAliases are essentially the same as Aliases, except that
# documents in the realname directory are treated as applications and
# run by the server when requested rather than as documents sent to the client.
# The same rules about trailing "/" apply to ScriptAlias directives as to
# Alias.
#
ScriptAlias /cgi-bin/ "/home/ashutosh/www/www-devel.mydomain.com/cgi-bin/"
<Directory "/home/ashutosh/www/www-devel.mydomain.com/cgi-bin">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>
Alias /cgi-src/ "/home/ashutosh/www/www-devel.mydomain.com/cgi-bin/"
<Location /cgi-src/>
<IfModule mod_dav.c>
DAV On
DAVDepthInfinity on
AuthUserFile /home/ashutosh/www/www-devel.mydomain.com/htpasswd
AuthName mydomain-www
AuthType Basic
require user mydomain
</IfModule>
</Location>
Alias /download/ "/home/ashutosh/www/www-devel.mydomain.com/download-info/"
<Directory "/home/ashutosh/www/www-devel.mydomain.com/download-info/">
AllowOverride None
Options None
Order allow,deny
Allow from all
Action pl-script /cgi-bin/download.pl
AddHandler pl-script .html
</Directory>
</IfModule>
</VirtualHost>
<VirtualHost *>
ServerAdmin ashutosh@mydomain.com
DocumentRoot /home/ashutosh/www/backup.in.mydomain.com/html
ServerName backup.in.mydomain.com
ServerAlias backup.in
ErrorLog /home/ashutosh/www/backup.in.mydomain.com/logs/error_log
CustomLog /home/ashutosh/www/backup.in.mydomain.com/logs/access_log common
<Directory "/home/ashutosh/www/backup.in.mydomain.com/html">
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from 192.168 127.0.0.1
</Directory>
<IfModule mod_mime.c>
AddType text/html .html .htm
AddType application/x-httpd-php .html .htm .php4 .php
</IfModule>
</VirtualHost>