This forum is no longer active. Please post your questions to our new community site

Forums Redmine

Redmine+SVN+Apache+SSL=Error 403

Subscribe to Redmine+SVN+Apache+SSL=Error 403 7 post(s), 3 voice(s)

 
Avatar dreamland 15 post(s)

Hello,

I am trying to create 2 repos for 2 projects, with read/write permissions, to be private and over https.

So far I’ve done this for each project :

1. mkdir /var/svn/pro1
2. chown root:www /var/svn/pro1
3. chmod 0750 /var/svn/pro1
4. “Enable WS for repository management” box checked
5. svnadmin create /var/svn/pro1
6. I added the following location in apache2/conf/httpd.conf

<Location /svn/pro1>
DAV svn
SVNParentPath “/var/svn/pro1”
AuthType Basic
AuthName “Pro1 repo”
AuthUserFile /var/svn/pro1/conf/passwd
Require valid-user

If I go to https://my.server.com/svn/pro1 I am asked to accept the certificate and after that asked for username/password. But I cannot authenticate using the user/pass I put in passwd file or any other user, and I end up with

“403 Authorization Required. This server could not verify that you are authorized to access the document requested. Either you supplied the wrong credentials (e.g., bad password), or your browser doesn’t understand how to supply the credentials required.”

I’m convinced the user/pass is good, so it must the second cause. I saw on other forums that perl module is used to authenticate, and it is not loaded on httpd.conf. How can I do that as a2enmod command doesn’t work.

I tried from the terminal, browser and tortoisesvn. All give the same result.
However, if I run : svn info file:///var/svn/pro1, everything is fine.

Can you please help ?
Thanks.

 
Avatar Beltrán Rueda Administrator 3,714 post(s)

Hi,

If you include the following lines in the httpd.conf file you need to create the user and password to access to the repository through the web:


AuthType Basic
AuthName “Pro1 repo”
AuthUserFile /var/svn/pro1/conf/passwd

You can create the user and password using the following command:

$ cd
$ apache2/bin/htpasswd -cb /var/svn/pro1/conf/passwd USER PASSWORD

I hope it helps.

 
Avatar dreamland 15 post(s)

Hi beltran,

Thank you for the answer. I created the user and I am able to authenticate but after that I get
“403 Forbidden : You don’t have permission to access /svn/pro1 on this server.”
The user for /var/svn/pro1 is “root” and group “www”. The user I just created does not exist in OS, only in redmine.
I have in the repository tab under project settings file:///var/svn/pro1 without any user/pass and I can see the repository tree under the Repository tab.
The purpose of this is to be able to access remotely using tortoisesvn via https.
What is the right way to accomplish this ?

Thank you.

 
Avatar dreamland 15 post(s)

Hi,

I scrapped everything related to subversion, removed ssl and started again. I need to access the repo via http. The short version of what I’ve done is as follows :

mkdir /var/svn/pro1
chown -R daemon:daemon /var/svn/pro1 (I believe this is the Apache user as seen on httpd.conf and ps -ef | grep httpd)
chmod 0750 /var/svn/pro1
svnadmin create /var/svn/pro1

Added the location on apache2/conf/httpd.conf :

<Location /svn/pro1>
DAV svn
SVNParentPath /var/svn/pro1
SVNListParentPath On

If I go to http://my.server.com/svn/pro1 I see the folders inside : conf, db, hooks and locks but no repo files.

I added the path file:///var/svn/pro1 in Project Pro1 > Settings > Repository in Redmine interface and I can see the the files under Repository tab.

Can you please advise what to do next to see the repo over http ?

Thank you.

 
Avatar dreamland 15 post(s)

Hi,

After changing the path for SVNParentPath to /var/svn I can see the pro1 project, but when I want to access the repository I get :

“This XML file does not appear to have any style information associated with it. The document tree is shown below.
errcode=”200029 : Could not open the requested SVN filesystem "

Looks like PHP5 module was responsable for all the mess.
After commenting the line LoadModule php5_module modules/libphp5.so in apache2/conf/httpd.conf browsing the repos was working great.

Thanks.

 
Avatar Beltrán Rueda Administrator 3,714 post(s)

I’m glad to hear this!

 
Avatar loige 11 post(s)

I’ve got the same issues and deactivating PHP module worked for me too…
That’s a strange issue… It’s good that i don’t need PHP for now on my bitnami virtual server

@dreamland TNX for the suggestion, i was getting mad! :D

Forums Redmine