You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by "Andrew A. Sabitov" <sa...@catalysis.nsk.su> on 2004/01/15 15:24:26 UTC

[users@httpd] Virtual Host && root auto indexing problem

Hello everybody!

I used apache 1.3.20 under Linux SuSE 7.3, and now I updated it to 2.0.48.  
As result I have strange bug I cannot find. This host supports two virtual
sites: www.inetlab.com and np.inetlab.com. This is concerning part of
httpd.conf (I changed only these settings in 2.0.48 default config, it is 
not old version config.)

========================================================================
#
# Use name-based virtual hosting.
#
NameVirtualHost *:80

<VirtualHost *:80>
        ServerName inetlab.com
        ServerAlias inetlab.com www.inetlab.com 
        ServerAdmin webmaster@inetlab.com
        DocumentRoot /var/www/www.inetlab.com/htdocs
        ScriptAlias /cgi-bin/ "/var/www/www.inetlab.com/cgi-bin/"
        <Directory "/var/www/www.inetlab.com/cgi-bin">
                AllowOverride None
                Options ExecCGI
                Order allow,deny
                Allow from all
        </Directory>
</VirtualHost>
<VirtualHost *:80>
        ServerName np.inetlab.com
        ServerAdmin webmaster@inetlab.com
        DocumentRoot /var/www/netpay/htdocs
        ScriptAlias /cgi-bin/ "/var/www/netpay/cgi-bin/"
        <Directory "/var/www/netpay/cgi-bin">
                AllowOverride None
                Options ExecCGI
                Order allow,deny
                Allow from all
        </Directory>
</VirtualHost>
========================================================================

All requests to inetlab.com or www.inetlab.com work well. 

When I requst this URL http://np.inetlab.com/index.html it works correct
too. But if I requets http://np.inetlab.com or http://np.inetlab.com/ it
fails, because it tries to work with
/var/www/www.inetlab.com/htdocs/index.html instead of
/var/www/netpay/htdocs/index.html !!!!! I cannot find any reason why it 
works such funny way :( 




additionaly, content of /var/www/netpay/htdocs/index.html
========================================================================
<html>
<body>
np.inetlab.com
</body>
</html>
========================================================================

content of /var/www/www.inetlab.com/htdocs/index.html
========================================================================
<html>
<head>
  <meta http-equiv="refresh" content="0; url=index.php">
</head>
</html>
========================================================================







-- 
       ,,,,
       /'^'\
      ( o o )
--oOOO--(_)--OOOo------------------------------------------------
|                  Andrew A. Sabitov
|                  Email: sabitov@catalysis.nsk.su
|                  WWW:   fir.catalysis.nsk.su/~sabitov
| .oooO   Еж птица гордая - пока не пнешь, не полетит!
| (   )   Oooo.
---\ (----(   )-------------------------------------------------
    \_)    ) /
          (_/

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Virtual Host && root auto indexing problem

Posted by Jez Hancock <je...@munk.nu>.
On Thu, Jan 15, 2004 at 08:24:26PM +0600, Andrew A. Sabitov wrote:
> 
> Hello everybody!
> 
> I used apache 1.3.20 under Linux SuSE 7.3, and now I updated it to 2.0.48.  
> As result I have strange bug I cannot find. This host supports two virtual
> sites: www.inetlab.com and np.inetlab.com. This is concerning part of
> httpd.conf (I changed only these settings in 2.0.48 default config, it is 
> not old version config.)
<snip>
Seems ok here.

inetlab.com:

[16:33:38] munk@users /home/munk# telnet inetlab.com 80
Trying 217.70.105.130...
Connected to inetlab.com.
Escape character is '^]'.
GET / HTTP/1.1
HOST: inetlab.com

HTTP/1.1 200 OK
Date: Thu, 15 Jan 2004 19:37:21 GMT
Server: Apache/2.0.47 (Unix) mod_ssl/2.0.47 OpenSSL/0.9.6b DAV/2 PHP/4.3.4
Last-Modified: Fri, 24 Oct 2003 08:14:22 GMT
ETag: "9e206-5c-66501380"
Accept-Ranges: bytes
Content-Length: 92
Content-Type: text/html; charset=ISO-8859-1

<html>
<head>
  <meta http-equiv="refresh" content="0; url=index.php">
</head>
</html>

and np.inetlab.com:

[16:34:20] munk@users /home/munk# telnet np.inetlab.com 80
Trying 217.70.105.130...
Connected to np.inetlab.com.
Escape character is '^]'.
GET / HTTP/1.1
HOST: np.inetlab.com

HTTP/1.1 200 OK
Date: Thu, 15 Jan 2004 19:38:07 GMT
Server: Apache/2.0.47 (Unix) mod_ssl/2.0.47 OpenSSL/0.9.6b DAV/2 PHP/4.3.4
Last-Modified: Wed, 10 Dec 2003 22:10:05 GMT
ETag: "9607f-2d-8d9c2940"
Accept-Ranges: bytes
Content-Length: 45
Content-Type: text/html; charset=ISO-8859-1

<html>
<body>
np.inetlab.com
</body>
</html>


-- 
Jez Hancock
 - System Administrator / PHP Developer

http://munk.nu/
http://jez.hancock-family.com/  - personal weblog
http://ipfwstats.sf.net/        - ipfw peruser traffic logging

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org