niXforums Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   PreferencesPreferences   Log in to check your private messagesLog in to check your private messages   Log inLog in 
·  nixdoc.net ·  man pages ·  Linux HOWTOs ·  FreeBSD Tips ·  Forums
navigation Forum index » Apps » Apache
htaccess with mod_auth_mysql
Post new topic   Reply to topic Page 1 of 1 [7 Posts] View previous topic :: View next topic
Author Message
Daniel Silva
*nix forums beginner


Joined: 06 Apr 2005
Posts: 11

PostPosted: Sun Jan 29, 2006 3:01 am    Post subject: Re: htaccess with mod_auth_mysql Reply with quote

Quote:
Ok, Joshua. But the apache documentation says:

Keep reading. It says (in bold text): if you use an ErrorDocument 401
directive then it must refer to a local document.

Joshua.


Ok, I see it. Once again, thanks for the support.

---------------------------------------------------------------------
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
Back to top
Joshua Slive
*nix forums Guru


Joined: 07 Feb 2005
Posts: 1647

PostPosted: Sun Jan 29, 2006 2:49 am    Post subject: Re: htaccess with mod_auth_mysql Reply with quote

On 1/28/06, Daniel Silva <danielnsilva@gmail.com> wrote:

Quote:
Ok, Joshua. But the apache documentation says:

Keep reading. It says (in bold text): if you use an ErrorDocument 401
directive then it must refer to a local document.

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
Back to top
Daniel Silva
*nix forums beginner


Joined: 06 Apr 2005
Posts: 11

PostPosted: Sun Jan 29, 2006 1:19 am    Post subject: Re: htaccess with mod_auth_mysql Reply with quote

On 1/28/06, Joshua Slive <joshua@slive.ca> wrote:
Quote:
On 1/28/06, Daniel Silva <danielnsilva@gmail.com> wrote:

The fix is to use only absolute URLs (starting in http:// or at least
/) in the errordocument.


Iīve tried to use absolute URLs, like this:

ErrorDocument 401 http://200.xxx.xxx.xxx/solicitar_acesso.php

But, the browser shows the default ErrorDocument...
Why?

I meant to use absolute references inside the php file pointed to by
ErrorDocument. The Errordocument directive itself must not use an
absolute url, as the docs or error_log would tell you.

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



Ok, Joshua. But the apache documentation says:

-------------------------------------------------------------
URLs can begin with a slash (/) for local web-paths (relative to the
DocumentRoot), or be a full URL which the client can resolve.
Alternatively, a message can be provided to be displayed by the
browser. Examples:

ErrorDocument 500 http://foo.example.com/cgi-bin/tester
ErrorDocument 404 /cgi-bin/bad_urls.pl
ErrorDocument 401 /subscription_info.html
ErrorDocument 403 "Sorry can't allow you access today"
-------------------------------------------------------------

Therefore I thought that you spoke about the directive ErrorDocument.
But now i know that absolute references must not used for Error 401.

Thanks for support.

Daniel

---------------------------------------------------------------------
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
Back to top
Joshua Slive
*nix forums Guru


Joined: 07 Feb 2005
Posts: 1647

PostPosted: Sun Jan 29, 2006 12:55 am    Post subject: Re: htaccess with mod_auth_mysql Reply with quote

On 1/28/06, Daniel Silva <danielnsilva@gmail.com> wrote:

Quote:
The fix is to use only absolute URLs (starting in http:// or at least
/) in the errordocument.


Iīve tried to use absolute URLs, like this:

ErrorDocument 401 http://200.xxx.xxx.xxx/solicitar_acesso.php

But, the browser shows the default ErrorDocument...
Why?

I meant to use absolute references inside the php file pointed to by
ErrorDocument. The Errordocument directive itself must not use an
absolute url, as the docs or error_log would tell you.

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
Back to top
Daniel Silva
*nix forums beginner


Joined: 06 Apr 2005
Posts: 11

PostPosted: Sun Jan 29, 2006 12:37 am    Post subject: Re: htaccess with mod_auth_mysql Reply with quote

On 1/28/06, Joshua Slive <joshua@slive.ca> wrote:
Quote:
On 1/27/06, Daniel Silva <danielnsilva@gmail.com> wrote:
Hi,

I have a .htaccess file in a direcory of my web server, that contains:
-------------------------------------------------------------------------------------------
AuthName "Conteudo exclusivo"
AuthType Basic

AuthMySQLUser usuario
AuthMySQLPassword senha
AuthMySQLDB banco
AuthMySQLUserTable tabela
AuthMySQLNameField usuario
AuthMySQLPasswordField senha

require valid-user

ErrorDocument 401 /solicitar_acesso.php
-------------------------------------------------------------------------------------------

The question is: when i try to access a file in the protected
directory, cancelling the authentication, the file
"solicitar_acesso.php" is loaded, but on load, trying to open CSS
files e images of the page, the authentication is required again, and
if donīt make it the files donīt open. The file "solicitar_acesso.php"
and others files arenīt in the protected directory.

When apache servers the errordocument, it doesn't tell the browser the
location that it is serving from, so the browser still sees the URL as
being the originally requested (authenticated) url. Hence all
relative URLs in the errordocument will be interpreted relative to the
authenticated document.

The fix is to use only absolute URLs (starting in http:// or at least
/) in the errordocument.

Joshua.


Joshua,

Iīve tried to use absolute URLs, like this:

ErrorDocument 401 http://200.xxx.xxx.xxx/solicitar_acesso.php

But, the browser shows the default ErrorDocument...
Why?

Daniel

---------------------------------------------------------------------
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
Back to top
Joshua Slive
*nix forums Guru


Joined: 07 Feb 2005
Posts: 1647

PostPosted: Sat Jan 28, 2006 4:27 pm    Post subject: Re: htaccess with mod_auth_mysql Reply with quote

On 1/27/06, Daniel Silva <danielnsilva@gmail.com> wrote:
Quote:
Hi,

I have a .htaccess file in a direcory of my web server, that contains:
-------------------------------------------------------------------------------------------
AuthName "Conteudo exclusivo"
AuthType Basic

AuthMySQLUser usuario
AuthMySQLPassword senha
AuthMySQLDB banco
AuthMySQLUserTable tabela
AuthMySQLNameField usuario
AuthMySQLPasswordField senha

require valid-user

ErrorDocument 401 /solicitar_acesso.php
-------------------------------------------------------------------------------------------

The question is: when i try to access a file in the protected
directory, cancelling the authentication, the file
"solicitar_acesso.php" is loaded, but on load, trying to open CSS
files e images of the page, the authentication is required again, and
if donīt make it the files donīt open. The file "solicitar_acesso.php"
and others files arenīt in the protected directory.

When apache servers the errordocument, it doesn't tell the browser the
location that it is serving from, so the browser still sees the URL as
being the originally requested (authenticated) url. Hence all
relative URLs in the errordocument will be interpreted relative to the
authenticated document.

The fix is to use only absolute URLs (starting in http:// or at least
/) in the errordocument.

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
Back to top
Daniel Silva
*nix forums beginner


Joined: 06 Apr 2005
Posts: 11

PostPosted: Sat Jan 28, 2006 4:35 am    Post subject: htaccess with mod_auth_mysql Reply with quote

Hi,

I have a .htaccess file in a direcory of my web server, that contains:
-------------------------------------------------------------------------------------------
AuthName "Conteudo exclusivo"
AuthType Basic

AuthMySQLUser usuario
AuthMySQLPassword senha
AuthMySQLDB banco
AuthMySQLUserTable tabela
AuthMySQLNameField usuario
AuthMySQLPasswordField senha

require valid-user

ErrorDocument 401 /solicitar_acesso.php
-------------------------------------------------------------------------------------------

The question is: when i try to access a file in the protected
directory, cancelling the authentication, the file
"solicitar_acesso.php" is loaded, but on load, trying to open CSS
files e images of the page, the authentication is required again, and
if donīt make it the files donīt open. The file "solicitar_acesso.php"
and others files arenīt in the protected directory.

RHEL3
httpd-2.0.46-25.ent
mod_auth_mysql-20030510-1.ent

Any idea?

PS: Sorry my poor english.

[]s
Daniel

---------------------------------------------------------------------
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
Back to top
Google

Back to top
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [7 Posts] View previous topic :: View next topic
The time now is Thu Jan 08, 2009 1:55 pm | All times are GMT
navigation Forum index » Apps » Apache
Jump to:  

Similar Topics
Topic Author Forum Replies Last Post
No new posts mod_auth_mysql Michael Luff Apache 1 Wed Jul 19, 2006 7:31 am
No new posts per-user authorisation without .htaccess basant mudalgi Apache 0 Sat Jul 08, 2006 8:33 pm
No new posts .htaccess help Noel Stratton Apache 1 Fri Jul 07, 2006 11:23 pm
No new posts per-user authorisation without .htaccess basant mudalgi Apache 0 Fri Jul 07, 2006 9:32 pm
No new posts .htaccess error URGENT Dwayne Tharpe Apache 3 Thu Jun 29, 2006 6:08 pm

PS2 Cheat Codes | Bank Credit Cards | Credit Cards | Problem Mortgage | Free Mmorpg
Copyright © 2004-2005 DeniX Solutions SRL
 
Other DeniX Solutions sites: Unix/Linux blog |  electronics forum |  medicine forum |  science forum | 
Privacy Policy


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1985s ][ Queries: 20 (0.0947s) ][ GZIP on - Debug on ]