Mailing List Archive

No login popup: "Authentication information not available"
I did not become a login popup at trac.domain.de/login.
My config:
Alias /chrome/common /var/www/vhosts/domain.de/trac.domain.de/htdocs/common
Alias /chrome/site /var/www/vhosts/domain.de/trac.domain.de/htdocs/site

<Directory "/var/www/vhosts/domain.de/trac.domain.de/htdocs">
# For Apache 2.2
<IfModule !mod_authz_core.c>
Order allow,deny
Allow from all
</IfModule>
# For Apache 2.4
<IfModule mod_authz_core.c>
Require all granted
</IfModule>
</Directory>

<Location "/chrome/common/">
SetHandler None
</Location>

<Location />
SetHandler mod_python
PythonHandler trac.web.modpython_frontend
PythonOption TracEnv /var/www/vhosts/domain.de/trac.domain.de
PythonOption TracUriRoot /
</Location>

<Location /login>
AuthType Basic
AuthName "domain"
AuthUserFile /var/www/vhosts/domain.de/trac.domain.de/.htpasswd
Require valid-user
</Location>

this works (shorten):
<Location />
SetHandler mod_python
PythonHandler trac.web.modpython_frontend
PythonOption TracEnv /var/www/vhosts/domain.de/trac.domain.de
PythonOption TracUriRoot /
AuthType Basic
AuthName "domain"
AuthUserFile /var/www/vhosts/domain.de/trac.domain.de/.htpasswd
Require valid-user
</Location>

But do a global login.

How can I fix it?
(BTW: I am using Plesk Obsidian with Apache 2.4 and Nginx as proxy.

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/f24e46ae-ddc8-4e8f-b39d-55bc4a875a6bo%40googlegroups.com.
Re: No login popup: "Authentication information not available" [ In reply to ]
On Fri, Jun 5, 2020 at 9:26 AM Roger Rehnelt <rrehnelt@gmail.com> wrote:

> I did not become a login popup at trac.domain.de/login.
> My config:
> Alias /chrome/common /var/www/vhosts/
> domain.de/trac.domain.de/htdocs/common
> Alias /chrome/site /var/www/vhosts/domain.de/trac.domain.de/htdocs/site
>
> <Directory "/var/www/vhosts/domain.de/trac.domain.de/htdocs">
> # For Apache 2.2
> <IfModule !mod_authz_core.c>
> Order allow,deny
> Allow from all
> </IfModule>
> # For Apache 2.4
> <IfModule mod_authz_core.c>
> Require all granted
> </IfModule>
> </Directory>
>
> <Location "/chrome/common/">
> SetHandler None
> </Location>
>
> <Location />
> SetHandler mod_python
> PythonHandler trac.web.modpython_frontend
> PythonOption TracEnv /var/www/vhosts/domain.de/trac.domain.de
> PythonOption TracUriRoot /
> </Location>
>
> <Location /login>
> AuthType Basic
> AuthName "domain"
> AuthUserFile /var/www/vhosts/domain.de/trac.domain.de/.htpasswd
> Require valid-user
> </Location>
>
> this works (shorten):
> <Location />
> SetHandler mod_python
> PythonHandler trac.web.modpython_frontend
> PythonOption TracEnv /var/www/vhosts/domain.de/trac.domain.de
> PythonOption TracUriRoot /
> AuthType Basic
> AuthName "domain"
> AuthUserFile /var/www/vhosts/domain.de/trac.domain.de/.htpasswd
> Require valid-user
> </Location>
>
> But do a global login.
>
> How can I fix it?
> (BTW: I am using Plesk Obsidian with Apache 2.4 and Nginx as proxy.
>

Try placing your /login block before your / block:
https://trac.edgewall.org/wiki/TracModPython#LoginNotWorking

- Ryan

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/CA%2BBGpn-Hud%3DEjex8bBZEYxEgDF-QKWCUf4_oX%2BRWiPqRHUXDLw%40mail.gmail.com.
Re: No login popup: "Authentication information not available" [ In reply to ]
Am Freitag, 5. Juni 2020 18:36:08 UTC+2 schrieb RjOllos:
>
>
> Try placing your /login block before your / block:
> https://trac.edgewall.org/wiki/TracModPython#LoginNotWorking
>
>
No change.
The link I tested before my post. There are no other files or folders. Just
the trac installation.

I always tested it, by closing and re-opening browser.
If I click on "login", there will be no access-popup, only the trac site
with the error message. :(

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/896853b3-6bf0-4b3f-a881-14d36e0374d7o%40googlegroups.com.
Re: No login popup: "Authentication information not available" [ In reply to ]
GOT IT! 3 days of try and error...!
I need to add following lines to "Apache & nginx Settings > Additional
nginx directives":

> location /login/ {
> auth_basic "trac realm";
> auth_basic_user_file /var/www/vhosts/domain.de/trac.domain.de/.htpasswd;
> proxy_pass http://server-ip-adress:7080;
> proxy_set_header Host $host;
> proxy_set_header X-Real-IP $remote_addr;
> proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
> proxy_set_header Authorization $http_authorization;
> proxy_pass_header Authorization;
> }


Plus the apache config (my first code above)!

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/CAAy69-6Am_cMikxaOkWe%2B-yz4F-G846Pm%3DPkYw61LwHG3KaHcg%40mail.gmail.com.
Re: No login popup: "Authentication information not available" [ In reply to ]
On Mon, Jun 8, 2020 at 4:53 PM Roger Rehnelt <rrehnelt@gmail.com> wrote:
>
> GOT IT! 3 days of try and error...!
> I need to add following lines to "Apache & nginx Settings > Additional nginx directives":
>>
>> location /login/ {
>> auth_basic "trac realm";
>> auth_basic_user_file /var/www/vhosts/domain.de/trac.domain.de/.htpasswd;
>> proxy_pass http://server-ip-adress:7080;
>> proxy_set_header Host $host;
>> proxy_set_header X-Real-IP $remote_addr;
>> proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
>> proxy_set_header Authorization $http_authorization;
>> proxy_pass_header Authorization;
>> }
>
>
> Plus the apache config (my first code above)!

Works for me in my test environment. I guess your configuration has
something wrong.
Also, I suggest confirming 401 responses from the apache server using
curl directly, before checking nginx.

====
$ curl -sv -o /dev/null http://127.0.0.1:3000/login
* Trying 127.0.0.1...
* Connected to 127.0.0.1 (127.0.0.1) port 3000 (#0)
> GET /login HTTP/1.1
> Host: 127.0.0.1:3000
> User-Agent: curl/7.47.0
> Accept: */*
>
< HTTP/1.1 401 Unauthorized
< Date: Mon, 08 Jun 2020 08:35:04 GMT
< Server: Apache/2.4.18 (Ubuntu) mod_python/3.3.1 Python/2.7.12
< WWW-Authenticate: Basic realm="auth"
< Content-Length: 381
< Content-Type: text/html; charset=iso-8859-1
<
{ [381 bytes data]
* Connection #0 to host 127.0.0.1 left intact
====
<VirtualHost *:3000>
ServerAdmin webmaster@localhost
DocumentRoot /var/www

SetHandler mod_python
PythonPath "sys.path + ['${_VENVDIR}/lib/python2.7/site-packages']"
PythonInterpreter main_interpreter
PythonHandler trac.web.modpython_frontend
PythonOption TracEnv ${TRAC_ENV}
PythonOption TracUriRoot /

<Location />
Require all granted
</Location>
<Location /login>
AuthType Basic
AuthBasicProvider file
AuthName "auth"
AuthUserFile ${_PWD}htpasswd.txt
AuthGroupFile /dev/null
Require valid-user
</Location>
</VirtualHost>
====

--
Jun Omae <jun66j5@gmail.com> (?? ?)

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/CAEVLMaiD_Qr5BHSoAcMt7WKFBvC6-oTm222qo%3D2JbdER3pPh_Q%40mail.gmail.com.