Project

General

Profile

problem with repositories access control with apache, mod_dav_svn and mod_perl

Added by Patricio Lopez almost 14 years ago

Hello

I've been following this guide: http://www.redmine.org/wiki/1/Repositories_access_control_with_apache_mod_dav_svn_and_mod_perl

i got the svn repo autocreation, i was moving forward but got stuck at this point, and i get this error:

Syntax error on line 26 of /etc/apache2/mods-enabled/dav_svn.conf:
Invalid command 'RedmineDSN', perhaps misspelled or defined by a module not included in the server configuration
...fail!

In the tutorial there is a part that says:

"You first need to copy or link Redmine.pm to /usr/lib/perl5/Apache/Redmine.pm"

I've done that, and also under /usr/lib/perl5 i have both Apache and Apache2 folders, i've copied Redmine.pm to both, but i believe i'm missing something else, since that error above keeps showing...

I have a ubuntu hardy box
Any help? thank you.


Replies (14)

RE: problem with repositories access control with apache, mod_dav_svn and mod_perl - Added by Felix Schäfer almost 14 years ago

Please paste your whole dav_svn.conf and make sure the Redmine.pm file has adequate permissions (i.e. the user running apache can red it). Have installed all necessary perl modules?

RE: problem with repositories access control with apache, mod_dav_svn and mod_perl - Added by Patricio Lopez almost 14 years ago

Hello

All the files under /usr/lib/perl5/Apache and Apache2 have root:root permissions, i have all the modules that the guide mentions and they are enabled:

~#a2enmod perl
This module is already enabled!
~# a2enmod dav_svn
This module is already enabled!
# a2enmod dav
This module is already enabled!

This is my dav_svn.conf:

<Location /svn>
     DAV svn
     SVNParentPath "/srv/repos/svn" 
     Order deny,allow
     Deny from all
     Satisfy any

     PerlAccessHandler Apache::Authn::Redmine::access_handler
     PerlAuthenHandler Apache::Authn::Redmine::authen_handler
     AuthType Basic
     AuthName "Redmine SVN Repository" 

     #read-only access    
     <Limit GET PROPFIND OPTIONS REPORT>
        Require valid-user
        Allow from 200.xxx.xxx.xxx
      # Allow from another-ip
         Satisfy any
     </Limit>
     # write access
     <LimitExcept GET PROPFIND OPTIONS REPORT>
       Require valid-user
     </LimitExcept>

     ## for mysql
     RedmineDSN "DBI:mysql:database=railsapp_production;host=localhost" 
     ## for postgres
     # RedmineDSN "DBI:Pg:dbname=databasename;host=my.db.server" 
     ## for SQLite3
     # RedmineDSN "DBI:SQLite:dbname=database.db" 

     RedmineDbUser "myuser" 
     RedmineDbPass "mypass" 
 </Location>

Hope it helps

RE: problem with repositories access control with apache, mod_dav_svn and mod_perl - Added by Felix Schäfer almost 14 years ago

You need to put PerlLoadModule Apache::Redmine before the <Location> block, and I was thinking about perl modules, not the apache modules :-)

RE: problem with repositories access control with apache, mod_dav_svn and mod_perl - Added by Patricio Lopez almost 14 years ago

Sorry but, how do i find which perl modules are loaded? thank you.

RE: problem with repositories access control with apache, mod_dav_svn and mod_perl - Added by Patricio Lopez almost 14 years ago

Hello

I was just missing that line, now it works but if i try to authenticate i got an error like this:

Application error
Rails application failed to start properly

what could that be? thank you.

RE: problem with repositories access control with apache, mod_dav_svn and mod_perl - Added by Felix Schäfer almost 14 years ago

That looks more like a passenger issue… So svn is in /svn, where is you redmine located?

RE: problem with repositories access control with apache, mod_dav_svn and mod_perl - Added by Patricio Lopez almost 14 years ago

my redmine is in /var/www/railsapp
and my svn is in /srv/repos/svn

RE: problem with repositories access control with apache, mod_dav_svn and mod_perl - Added by Felix Schäfer almost 14 years ago

No, I meant on the webserver. You obviously have the svn on mydomain.com/svn, where do you expect redmine to be?

RE: problem with repositories access control with apache, mod_dav_svn and mod_perl - Added by Felix Schäfer almost 14 years ago

And are you expecting svn to be on the same domain, say redmine.mydomain.com/svn? Because the error you wrote about is a rails error, not anything you would normally get with the svn/perl thing.

RE: problem with repositories access control with apache, mod_dav_svn and mod_perl - Added by Patricio Lopez almost 14 years ago

well, yes thats what i expect, if i go to redmine.mydomain.com/svn i'm prompted for user and password, after that i get the error.
Which logs do i have to see? so i can get more details about the error (cuz that message, does not explain much).

RE: problem with repositories access control with apache, mod_dav_svn and mod_perl - Added by Patricio Lopez almost 14 years ago

Hello

I finally got it working, the problem was very simple, wrong typo on password. I'm sorry for all the trouble, thanks you helped me a lot.

RE: problem with repositories access control with apache, mod_dav_svn and mod_perl - Added by Felix Schäfer almost 14 years ago

You shouldn't put your svn in a subdirectory of your redmine installation, redmine expects to server everything "under it". I'd suggest moving your svn to another vhost. You could also try to disable your rails server for svn (PassengerStatus off or something like that if you have passenger, can't say for other servers), but I can't guarantee it will work.

RE: problem with repositories access control with apache, mod_dav_svn and mod_perl - Added by Felix Schäfer almost 14 years ago

Ah, sorry, I hadn't read your last message. Still not a good idea to have something sitting underneath your redmine, it might cross-shoot with some redmine stuff in the future.

    (1-14/14)