I am completely confused by http://trac.edgewall.org/wiki/TracModPython
I got trac running using tracd in about 10 minutes, and have spent the past six
hours trying to understand what that wiki page could possibly be saying.

I installed the project environment to /var/trac/widgets.  The entire directory and all subdirectories
are owned by apache.

# ls -la
total 12
drwxr-xr-x 9 apache root 344 Aug  4 20:52 .
drwxr-xr-x 3 apache root  72 Aug  4 16:30 ..
drwxr-xr-x 2 apache root  48 Aug  4 16:34 attachments
drwxr-xr-x 2 apache root 136 Aug  4 19:18 conf
drwxr-xr-x 2 apache root  48 Aug  4 16:34 htdocs
-rw-r--r-- 1 root   root   0 Aug  4 20:52 .htpasswd
-rw-r--r-- 1 apache root  38 Aug  4 18:35 .htusers
drwxr-xr-x 2 apache root  48 Aug  4 16:34 log
drwxr-xr-x 2 apache root  48 Aug  4 16:34 plugins
-rw-r--r-- 1 apache root  98 Aug  4 16:34 README
drwxr-xr-x 2 apache root 208 Aug  4 16:34 templates
-rw-r--r-- 1 apache root  27 Aug  4 16:34 VERSION
drwxr-xr-x 2 apache root  48 Aug  4 16:34 wiki-macros

The .htusers file has two users in it with encrypted passwords.  The users names
are joe and bob.
The .htpasswd file is empty. (According to the apache docs, .htpasswd only specifies
  additional restrictions past what is in httpd.conf.)

The relevant parts of my httpd.conf file are:

DocumentRoot "/var/www/html"


<Location /projects/widgets>
  SetHandler mod_python
  PythonHandler trac.web.modpython_frontend
   PythonOption TracEnv /var/trac/widgets
   PythonOption TracUriRoot "/projects/widgets"
</Location>

<Location /projects/widgets/login>
  AuthType Basic
  AuthName "widgets"
  AuthUserFile /var/trac/widgets/.htaccess
  Require valid-user
</Location>

<VirtualHost *:80>
    DocumentRoot /var/trac/widgets
     ServerName widgets-r-us.com
    <Directory />
        SetHandler mod_python
        PythonHandler trac.web.modpython_frontend
        PythonOption TracEnv /var/trac/widgets
        PythonOption TracUriRoot /
    </Directory>
    <Location /login>
        AuthType Basic
        AuthName "Widget Trac Server"
        AuthUserFile /var/trac/widgets/.htusers
        Require valid-user
    </Location>
</VirtualHost>

Then I restart httpd, browse to widgets-r-us.com, wait about 30 seconds, and I get a black and white page (no
decorations), with a Search box, a list of actions (the first one is login), and then a Welcome to Trac 0.10 message.

When I hit "login" (or actually any of the options), I get

Forbidden

You don't have permission to access /login on this server.

That is not surprising.  I look in the apache logs, and the page /login is being requested from widgets-r-us.com
And of course, that directory doesn't exist, because the install didn't create it.  So what is the deal?

_______________________________________________
Trac mailing list
[email protected]
http://lists.edgewall.com/mailman/listinfo/trac

Reply via email to