You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Jason <jt...@cartmanager.net> on 2002/04/22 17:11:30 UTC

problem with authentication while doing a redirect

I have a conf file with
<Location /cgi-bin/viewOrder.cgi>
        PerlAuthenHandler ApacheAuthentication
        AuthName realm
        AuthType Basic
        Require valid-user
        Order deny,allow
        Deny from all
        allow from 207.173.85.
</Location>

<Directory /home/vshopper/public_html/userpages/orders/*>
Options Indexes FollowSymLinks
IndexOptions NameWidth=30 DescriptionWidth=38
IndexOrderDefault Descending Date
AllowOverride Indexes AuthConfig
SSLRequireSSL
</Directory>




When I try to access each location, it requires authentication as expected.  However when I add the line
ScriptAliasMatch ^/orders/jter/(.*?)$ /home/vshopper/public_html/cgi-bin/viewOrder.cgi
into my virtualhost it does not require ANY authentication for anything that matches the pattern...

Does anybody know why this happens, and can you give me some advice in getting it to authenticate properly with the alias.

Thank you.


---------------------------------------------------------------------
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
For additional commands, e-mail: users-help@httpd.apache.org


Re: problem with authentication while doing a redirect

Posted by Jason <jt...@cartmanager.net>.
Thank you...

worked like a charm.


----- Original Message ----- 
From: "Joshua Slive" <jo...@slive.ca>
To: <us...@httpd.apache.org>
Sent: Monday, April 22, 2002 9:28 AM
Subject: Re: problem with authentication while doing a redirect


> Jason wrote:
> > I have a conf file with
> > <Location /cgi-bin/viewOrder.cgi>
> 
> > When I try to access each location, it requires authentication as expected.  However when I add the line
> > ScriptAliasMatch ^/orders/jter/(.*?)$ /home/vshopper/public_html/cgi-bin/viewOrder.cgi
> > into my virtualhost it does not require ANY authentication for anything that matches the pattern...
> > 
> > Does anybody know why this happens, and can you give me some advice in getting it to authenticate properly with the alias.
> 
> <Location> matches against URLs only.  If the client isn't requesting a 
> URL that looks like http://yoursite.example.com/cgi-bin/viewOrder.cgi, 
> then that <Location> section doesn't do anything.  What you probably want is
> <Directory /home/vshopper/public_html/cgi-bin/>
> <Files viewOrder.cgi>
> require ...
> </Files>
> </Directory>
> which is much safer anyway.
> 
> 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
> For additional commands, e-mail: users-help@httpd.apache.org


---------------------------------------------------------------------
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
For additional commands, e-mail: users-help@httpd.apache.org


Re: problem with authentication while doing a redirect

Posted by Joshua Slive <jo...@slive.ca>.
Jason wrote:
> I have a conf file with
> <Location /cgi-bin/viewOrder.cgi>

> When I try to access each location, it requires authentication as expected.  However when I add the line
> ScriptAliasMatch ^/orders/jter/(.*?)$ /home/vshopper/public_html/cgi-bin/viewOrder.cgi
> into my virtualhost it does not require ANY authentication for anything that matches the pattern...
> 
> Does anybody know why this happens, and can you give me some advice in getting it to authenticate properly with the alias.

<Location> matches against URLs only.  If the client isn't requesting a 
URL that looks like http://yoursite.example.com/cgi-bin/viewOrder.cgi, 
then that <Location> section doesn't do anything.  What you probably want is
<Directory /home/vshopper/public_html/cgi-bin/>
<Files viewOrder.cgi>
require ...
</Files>
</Directory>
which is much safer anyway.

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
For additional commands, e-mail: users-help@httpd.apache.org