httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Allan Dyer" <ad...@yuikee.com.hk>
Subject Problem with VirtualDocumentRoot, Alias and ScriptAlias when upgrading 1.3.9 -> 2.0.39
Date Sat, 29 Jun 2002 18:55:14 GMT
I've been using Apache 1.3.9 on Linux with multiple virtual hosts and shared 
directories for icons and cgi scripts. In srm.conf I have:

Alias /icons/ /usr/share/apache/icons/
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/

and in httpd.conf:

VirtualDocumentRoot /home/sites/%4/%3/%2/%1

Then I set up another server and installed Apache 2.0.39 to replace the old 
server. After I took note of the configuration directive changes for version 2, 
the server would run and serve pages from the different virtual hosts, but the 
icons and script directories were not accessible through the virtual hosts.

A typical entry from the error log is:

[Sun Jun 30 01:46:43 2002] [error] [client 210.184.87.231] File does not exist: 
/home/sites/hk/com/candies/www/icons, referer: http://www.candies.com.hk/

With the corresponding entry from the access log:

www.candies.com.hk 210.184.87.231 - - [30/Jun/2002:01:46:43 +0800] "GET 
/icons/logos/yklogo_n.gif HTTP/1.0" 404 222 "http://www.candies.com.hk/" 
"Mozilla/4.79 [en] (WinNT; U)" 0 "en,zh-CN,zh-TW"

I could access those directories through the default host. I no longer have a 
srm.conf file, so the Alias and ScriptAlias directives are in httpd.conf now. I 
have tried many variantions on the config file. I noticed there was a 
configuration with a similar purpose in:
http://httpd.apache.org/docs-2.0/vhosts/mass.html#combinations
that shows ScriptAlias being used with VirtualDocumentRoot, so I tried a 
similar configuration:

<VirtualHost 210.184.87.232:80 127.0.0.1:80>
    ServerName prawn.yuikee.com.hk 
    DocumentRoot /home/sites/hk/com/yuikee
    Alias /icons/ /usr/local/apache2/icons/ 
    ScriptAlias /cgi-bin/ /usr/local/apache2/cgi-bin/
    VirtualDocumentRoot /home/sites/%4/%3/%2/%1 
 
</VirtualHost>

to no avail. NameVirtualHost made no difference either. It is not a client 
caching problem, I did many of the tests using telnet to port 80.

I know the aliasing is working because I can leave an IP address out of the 
VirtualHost directive and access the icons and scripts directories through the 
default host. I can see the virtual hosting working. But the aliasing doesn't 
work with the VirtualDocumentRoot, even though it used to work in version 1.3.9

What am I missing? I checked the "Upgrading to 2.0 from 1.3" notes and found 
nothing relevant.
Is there some trick to doing this, or is it broken in version 2?

Thanks,

Allan Dyer, YKCL



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message