Hello, list!
I'm trying to get up and running with my first ever Trac instance, but
I seem to be having some issues with getting authentication to work
properly. I'm trying to configure basic auth for a project running tracd
which sits behind an nginx proxy. Here are the details of how I've setup
and configured the project (This was performed in accordance with the
wiki).
[root@sfo ~]# pip install trac
[root@sfo ~]# mkdir /home/centcom.lottspot.com
[root@sfo ~]# trac-admin /home/centcom.lottspot.com/ initenv
[root@sfo ~]# useradd -r trac
[root@sfo ~]# chown -R trac:trac /home/centcom.lottspot.com/
[root@sfo ~]# htpasswd -c
/home/centcom.lottspot.com/conf/users.htpasswd james
[root@sfo ~]# chown trac:trac
/home/centcom.lottspot.com/conf/users.htpasswd
[root@sfo ~]# trac-admin /home/centcom.lottspot.com/ permission add
admin james
[root@sfo ~]# su trac -c '/usr/bin/tracd -sp 8001
--basic-auth="centcom.lottspot.com,/home/centcom.lottspot.com/conf/users.htpasswd,trac"
/home/centcom.lottspot.com'
My nginx configuration:
[root@sfo ~]# cat /etc/nginx/conf.d/centcom.lottspot.com.conf
server {
listen 80;
server_name centcom.lottspot.com;
location / {
proxy_pass http://127.0.0.1:8001/;
proxy_redirect off;
proxy_buffering off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For
$proxy_add_x_forwarded_for;
fastcgi_param REMOTE_ADDR $remote_addr;
}
}
With this setup, I get the following result when attempting to login
james@gentoo ~ $ curl -I http://centcom.lottspot.com/login
HTTP/1.1 500 Internal Server Error
Server: nginx/1.0.15
Date: Mon, 20 Jan 2014 20:09:13 GMT
Content-Type: text/html;charset=utf-8
Connection: keep-alive
Cache-Control: must-revalidate
Expires: Fri, 01 Jan 1999 00:00:00 GMT
Content-Length: 4201
Set-Cookie: trac_form_token=023eb12f9d8df4ea0f3d0f8d; httponly; Path=/
Set-Cookie: trac_session=10acc3d25409d80431921606; expires=Sun,
20-Apr-2014 20:09:13 GMT; httponly; Path=/
And the page itself shows the error
"Authentication information not available. Please refer to the
installation documentation."
--
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/groups/opt_out.