You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Bill Dossett <bd...@emtex.com> on 2003/07/31 16:29:06 UTC
[users@httpd] authconfig directory and rewriting
Hi,
I'm stuck. I have a direcory under my web root /v
and I am authenticating users via ldap that want to
enter this directory... this works fine... but I
also am rewriting the url to be https:// in case the
user forgot and typed http:// ... but there is
some interaction that I don't understand. I rewrite
all URLs into the server as there is a java servlet
running on it and a directory that has authentication
protection... so this bit rewrites all URLs...
# the rewrite section
<Location />
Options FollowSymLinks
AllowOverride FileInfo Indexes AuthConfig Limit
RewriteEngine on
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://%{SERVER_NAME}/$1 [NC]
</Location>
RewriteLog /var/log/httpd/rewritelog
RewriteLogLevel 10
# and then
#the directory that requires authentication
<Directory /var/www/html/v>
AuthType Basic
AuthName "password required"
Options FollowSymLinks SymLinksifOwnerMatch
AuthLDAPURL
"ldap://ldap.example.com:389/dc=example,dc=com?uid?sub?(objectClass=*)"
require valid-user
</Directory>
The rewrite rule works fine for everything but the <Directory....
when I give it that URL, it rewrites, but gets the whole path
in it and the unauthorized html thingy... (I'm using apache 2.0.45 i
think...)
https://www.example.com/var/www/error/HTTP_UNAUTHORIZED.html.var
and I have been trying different combos of stuff all morning and
this is pretty much where I'm stuck. I don't usually give up this easy,
but I my eye's are going a bit funny looking at things, so if anyone
could tell me how I am being stupid in this case, I would hugely
appreciate it.
Thanks
Bill
---------------------------------------------------------------------
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] authconfig directory and rewriting
Posted by Joshua Slive <jo...@slive.ca>.
On Thu, 31 Jul 2003, Bill Dossett wrote:
> # the rewrite section
> <Location />
> Options FollowSymLinks
> AllowOverride FileInfo Indexes AuthConfig Limit
> RewriteEngine on
> RewriteCond %{SERVER_PORT} 80
> RewriteRule ^(.*)$ https://%{SERVER_NAME}/$1 [NC]
> </Location>
Neither Options FollowSymLinks nor AllowOverride work in <Location>
sections. See:
http://httpd.apache.org/docs-2.0/sections.html#whatwhere
In addition, it is silly to put the Rewrite stuff inside a <Location />.
Just put it in the main server config (outside any section) and it should
work.
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