httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cameron Smith <>
Subject [users@httpd] ScriptAliasMatch not working on unix
Date Mon, 21 Sep 2009 14:00:37 GMT
I was running an Apache Server version 2.2 on Windows. I was using
ActiveState Perl as my perl installation. I had some other code which
was going to make a request of my IP address (, and
thus be requesting '/', I needed to redirect this request to a handler

Thus I added the following line to my httpd.conf:
ScriptAliasMatch ^/$ "C:/Program Files/Apache Software

This now worked fine, and all was right with the world.

Then I was told that I would need to port my code to Unix, Centos in
particular, and that the version of Apache on that box would be 2.0.
(I have looked into it further, and luckily it is 2.2, so I don’t need
to worry about incompatibilities there.)

I took the conf file from the unix apache install and altered it to
reflect my httpd.conf file, including altering the previous
ScriptAliasMatch line so that it now says:
ScriptAliasMatch ^/$ "/var/www/cgi-bin/"

All of my other requests now work, I can run the scripts in my cgi-bin
directory, but this one is a problem. When I try to issue a request I
get the following error in a '404 Not Found' page, 'The requested URL
/ was not found on this server'. I also get the following in my
error_log, '[error] [client] Attempt to serve directory:

It seems to be ignoring my ScriptAliasMatch command and is just trying
to serve a non-existant index.html file, or failing that the whole
html directory.  But _why_ is it ignoring this command?

Any ideas on how to get this to work?

Thanks in advance,


The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message