Current time: 04-20-2014, 01:16 AM Hello There, Guest! (LoginRegister)

Post Reply 
trac installation
06-04-2009, 09:13 PM
Post: #1
trac installation
I'm trying the One Click Trac install of Trac with a Subversion creation - and while the website "works", there are no authenticated users automatically added to Trac, no way to add them via the web, and when I try via command line, I get errors running the trac-admin utility, noting there's no "VERSION" directory.

Does anyone have advice of how to get users working?
Find all posts by this user
Quote this message in a reply
06-05-2009, 06:28 AM
Post: #2
trac installation
Had the same problem, along with a few others. Seems theres a few teething problems with trac install, I've reported what I've found to support.

I've managed to get a rather kludgy workaround in place for now by doing the following:

1) Editing .htaccess and added basic authentication, pointing AuthUserFile to the repository's .passwd file

2) Ran trac-admin and added relevent permissions to an account, then was able to use web admin within trac on that account.

It's not the best way (uses basic http auth, no anonymous users and cannot logout without destroying session), but it works for me until the issues with trac can be resolved and picks up the users from the repository fine.

The issue with trac admin reporting no VERSION usually means that you didn't get the path to your trac env correct.

trac-admin /path/to/your/trac/ permission add some_username TRAC_ADMIN

Where path is the location of your web accesible trac env and username is the user to give the permissions to.

Like I said, a horrendous kludge but it's got me up and running until something better comes along Smile
Find all posts by this user
Quote this message in a reply
06-05-2009, 08:40 AM
Post: #3
trac installation
I saw the workaround to edit .htaccess - and I may not be the best apache admin - but this causes the site to break. Any idea why?:

<Files *.cgi>
SetHandler fastcgi-script
</Files>

<Location "/trac/login">
AuthType Basic
AuthName "Trac"
AuthUserFile $HOME/<my domain>/<my site>/trac.htpasswd
Require valid-user
</Location>

DirectoryIndex index.fcgi

# Make sure rewrites work
Options ExecCGI FollowSymLinks

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-d
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-f
RewriteCond $1 !^index.fcgi/(.*)
# Keep the graphics and style sheet the way they are
RewriteCond $1 !^(.*).css$
RewriteCond $1 !^(.*).gif$
RewriteCond $1 !^(.*).jpg$
RewriteCond $1 !^(.*).png$
RewriteRule ^(.*)$ index.fcgi/$1 [L]
</IfModule>
Find all posts by this user
Quote this message in a reply
06-08-2009, 02:42 AM
Post: #4
trac installation
Sorry for delayed reply, been away for the weekend.

I think its the <Location> directive causing your problem.

I've done it like this:

AuthUserFile /home/your_username/svn/your_repository_name.passwd
AuthName "Trac Access"
AuthType Basic
Require valid-user

note the AuthUserFile points to the .passwd file for the repository and it's not Location limited.

This will give you a username/password prompt whenever you visit any page on the trac site, which will be used as your trac login.

Like I said, not ideal but I needed to get this up and running quickly with authentication and using the users from the repository. I can live without anonymous access for now.

If there's been any updates or there's a better way to do this on DH that anybody has found I'm all ears Smile

All I've managed to find so far is this : http://wiki.dreamhost.com/Troubleshoot_T...ck_Install
Find all posts by this user
Quote this message in a reply
06-23-2009, 07:08 PM
Post: #5
trac installation
Above worked for me thanks with respect to auth!

However, I recieved a "Missing or invalid form token. Do you have cookies enabled?" trac error message whenever I tried to save anything. Adding the following in the mod_rewrite section will take care of the error.

RewriteCond? $1 !^(.*).js$
Find all posts by this user
Quote this message in a reply
07-06-2009, 08:20 AM
Post: #6
trac installation
Hi guys,

This info has helped me get Trac running, however I have one major issue left.

Using
RewriteCond $1 !^(.*).gif$
RewriteCond $1 !^(.*).jpg$
RewriteCond $1 !^(.*).png$
RewriteCond $1 !^(.*).js$

In .htaccess means that viewing these files as attachements produces a 404. Any idea on how to view media files as attachments?? I'm at a loss here.. if I turn off the code above, the layout goes to hell... however I can view files again.

pete
Visit this user's website Find all posts by this user
Quote this message in a reply
07-06-2009, 09:24 AM
Post: #7
trac installation
Quote:In .htaccess means that viewing these files as attachements produces a 404. Any idea on how to view media files as attachments?? I'm at a loss here.. if I turn off the code above, the layout goes to hell... however I can view files again.
Simple. You need to modify the conditions for the rewrite to include doing the rewrite for attachments. And in case its not obvious this means testing the url-path and query string for whatever it is that indicates the request is for an attachment. Here is the documentation to help you out: Apache Module mod_rewrite

Cool openvein.org -//-
Visit this user's website Find all posts by this user
Quote this message in a reply
07-06-2009, 09:50 AM
Post: #8
trac installation
Thanks for the reply Atropos - sadly I am still very lost.

I understand "RewriteCond {subject} {condition} ".. and then you can use a RewriteRule if a condition is met..

I don't quite see what is going on, exactly, in these exact RewriteCond statements. They are all condition tests, right - however there are no RewriteRule entries.. so these lines are testing and nothing happens? And I must admit the actual condition is confusing. I know $1 is the variable - however, I don't understand what "!^(.*).css$" means, for example. Any explanation would be fantastic.

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-d
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-f
RewriteCond $1 !^index.fcgi/(.*)
# Keep the graphics and style sheet the way they are
RewriteCond $1 !^(.*).css$
RewriteCond $1 !^(.*).gif$
RewriteCond $1 !^(.*).jpg$
RewriteCond $1 !^(.*).png$
RewriteCond $1 !^(.*).js$
RewriteRule ^(.*)$ index.fcgi/$1 [L]
</IfModule>
Visit this user's website Find all posts by this user
Quote this message in a reply
07-06-2009, 11:09 AM
Post: #9
trac installation
Quote:I don't quite see what is going on, exactly, in these exact RewriteCond statements. They are all condition tests, right - however there are no RewriteRule entries.. so these lines are testing and nothing happens? And I must admit the actual condition is confusing. I know $1 is the variable - however, I don't understand what "!^(.*).css$" means, for example. Any explanation would be fantastic.
OK that just needs to be replaced with:
Code:
DirectoryIndex index.fcgi

Options ExecCGI FollowSymLinks
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.fcgi/$1 [L]
</IfModule>

Cool openvein.org -//-
Visit this user's website Find all posts by this user
Quote this message in a reply
09-11-2009, 03:57 AM
Post: #10
trac installation
Hello everybody,

I follow the instructions of the Solution 1 of this page http://wiki.dreamhost.com/Troubleshoot_T...ck_Install but when I access to my Trac, several authentication windows appears anytime I navigate in trac.

And the CSS doesn't work.

Do you have a solution to disable the several auth windows in trac ?

Regards,
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump: