httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Boyle Owen" <Owen.Bo...@swx.com>
Subject RE: [users@httpd] How to use DirectoryIndex when SetHandler is perl-script?
Date Wed, 11 Oct 2006 06:56:19 GMT
> -----Original Message-----
> From: news [mailto:news@sea.gmane.org] On Behalf Of Júlio Maranhão
> Sent: Tuesday, October 10, 2006 5:24 PM
> To: users@httpd.apache.org
> Subject: [users@httpd] How to use DirectoryIndex when 
> SetHandler is perl-script?
> 
> I want
> http://some.site/webcal
> or
> http://some.site/webcal/
> to call
> http://some.site/webcal/webcal.pl
> 
> DirectoryIndex webcal.pl does not work inside the Directory 
> below.

This is because the ScriptAlias directive is telling apache that the directory contains scripts.
So apache never goes near the directory listing mechanisms and so never sees any DirectoryIndex...

Before plunging into mod-rewrite, you might like to see if a simpler solution (at the cost
of a new directory) would work for you; 

- make "webcal" a plain directory (ie, not ScriptAlias)
- make a new dummy directory containing the program and ScritpAlias this
- set the DirectoryIndex of webcal to point to the program in the dummy dir

Eg,

ScriptAlias /dummy-cgi /path/to/dummy-cgi

<Directory /path/to/webcal>
  DirectoryIndex /dummy-cgi/webcal.pl
</Directory>

ScriptAlias /dummy-cgi /path/to/dummy-cgi

now http://some.site/webcal/ will go into the /path/to/webcal directory, find the DirectoryIndex
and execute a request for /dummy-cgi/webcal.pl. This will follow the ScriptAlias and execute
/path/to/dummy-cgi/webcal.pl. NOte that the browser will keep the location set to http://some.site/webcal/
so no-one will be any the wiser and "dummy-cgi" won't appear on the web.

Rgds,
Owen Boyle
Disclaimer: Any disclaimer attached to this message may be ignored. 


> So I tried 
> mod_rewrite. No luck. I never used it before. Any help?
> 
> PerlRequire "E:/Open/webcal/cgi-bin/startup.pl"
> Alias /webcal "E:/Open/webcal/cgi-bin"
> RewriteEngine On
> RewriteRule  ^/webcal$   /webcal/webcal.pl  [R=permanent]
> <Directory "E:/Open/webcal/cgi-bin">
>      AllowOverride All
>      SetHandler perl-script
>      PerlResponseHandler ModPerl::Registry
>      PerlOptions +ParseHeaders
>      Options +ExecCGI
>      Allow from all
> </Directory>
> 
> Júlio
> 
> 
> ---------------------------------------------------------------------
> 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
>
 
 
This message is for the named person's use only. It may contain confidential, proprietary
or legally privileged information. No confidentiality or privilege is waived or lost by any
mistransmission. If you receive this message in error, please notify the sender urgently and
then immediately delete the message and any copies of it from your system. Please also immediately
destroy any hardcopies of the message. You must not, directly or indirectly, use, disclose,
distribute, print, or copy any part of this message if you are not the intended recipient.
The sender's company reserves the right to monitor all e-mail communications through their
networks. Any views expressed in this message are those of the individual sender, except where
the message states otherwise and the sender is authorised to state them to be the views of
the sender's company.

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


Mime
View raw message