You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Richard Crawford <rc...@unexmail.ucdavis.edu> on 2003/06/11 17:19:14 UTC

[users@httpd] Multiple ScriptAliases

I have Apache 2.0.45 running on my system, and I have a lot of 
subdirectories that I would like to have as Script Aliases.  The trouble 
is, the number of these subdirectories could change from moment to 
moment.  Because I also have JRun running on this server, I can't just 
point at the Perl scripts and have them work; when I try, all I get is the 
Perl source code.

I have tried something like:

ScriptAlias /disboard/ 
/space/usr/jrun4/servers/default/cfusion/Campus/Courses/*/disboard/

but that doesn't seem to work.

Is there a way to do this without having to rewrite the Apache conf file 
each time I add a new subdirectory?


---------------------------------------------------------------------
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] Multiple ScriptAliases

Posted by Joshua Slive <jo...@slive.ca>.
On Wed, 11 Jun 2003, Richard Crawford wrote:
> I have tried something like:
>
> ScriptAlias /disboard/
> /space/usr/jrun4/servers/default/cfusion/Campus/Courses/*/disboard/
>
> but that doesn't seem to work.
>
> Is there a way to do this without having to rewrite the Apache conf file
> each time I add a new subdirectory?

Yes, but you haven't defined your problem clearly enough.  You need to
state exactly what the URL will look like, and exactly where in the
filesystem you want it to map to.

A couple guesses:

ScriptAliasMatch ^/disboard/([^/])/?(.*)
/space/usr/jrun4/servers/default/cfusion/Campus/Courses/$1/disboard/$2

That would map http://yourhost.example.com/disboard/one/two/file
to /space/.../Courses/one/disboard/two/file

Alternatively, if the directories are already accessible from the web, you
can use

<Directory
/space/usr/jrun4/servers/default/cfusion/Campus/Courses/*/disboard>
SetHandler cgi-script
Options ExecCGI
</Directory>

This simply forces everything in those directories to be treated as a CGI
script.

Joshua.

---------------------------------------------------------------------
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