Hard time setting up authentication with nginx+uwsgi+trac

649 views
Skip to first unread message

Italo Maia

unread,
Oct 9, 2013, 10:47:59 PM10/9/13
to trac-...@googlegroups.com
Hello folks! Recently I've been trying to setup trac with nginx+uwgsi+postgresql. So far so good. The only problem I'm facing right now is authentication. I downloaded the htpasswd.py script, created the user:password file but so far, nothing. When I click in login in my trac page, I just get this message:

Authentication information not available. Please refer to the installation documentation.

TracGuide — The Trac User and Administration Guide

In my nginx there is the follow:
server {
... server stuff
location / {
#.. stuff
auth_basic "Secure Login";
auth_basic_user_file /path/to/passwdfile
fastcgi_param  AUTH_USER          $remote_user;  # not sure if this is right
fastcgi_param  REMOTE_USER        $remote_user;  # not sure if this is right
}
}

Am I on the right track? Do I need special setup in my uwsgi ini file? Is there a way to fetch the users authentication from the database instead of a local file? Is it recomended? Thanks.

Илья Антипов

unread,
Oct 22, 2013, 10:23:34 AM10/22/13
to trac-...@googlegroups.com
Here is my config that works

server {
  listen  80;
  server_name  sever.name.ru;

  location / {
        auth_basic "Restricted";
        auth_basic_user_file /var/www/trac/conf/htpasswd;
         proxy_pass_header Authorization;
    include  uwsgi_params;
    uwsgi_pass  127.0.0.1:5544;
  }
}

I just added the following strings to uwsgi_params 

uwsgi_param  SERVER_NAME        $server_name;
uwsgi_param  REMOTE_USER        $remote_user;


четверг, 10 октября 2013 г., 6:47:59 UTC+4 пользователь Italo Maia написал:
Reply all
Reply to author
Forward
0 new messages