VirtualMin and WebSVN

9 posts / 0 new
Last post
#1 Mon, 06/24/2013 - 06:09
loic.etibe

VirtualMin and WebSVN

Hello,

I installed a Virtualmin server on a Debian Squeeze box which works fine. It has some repositories with associated users and everything is running smoothly at that point.

So, I wanted to try and install WebSVN to offer my users online source browsing, but it looks like I'm stuck here. I did a simple sudo apt-get install websvn and configured it to run with apache2.

The problem is, when I go to http://domain.tld/websvn/, the browser is offering me to download the index.php instead of interpreting it. I'm not sure which config file I should look at to solve this issue as I've already tried to edit /etc/websvn/apache.conf with no luck.

Any help is welcome :-)

Mon, 06/24/2013 - 09:36
andreychek

Howdy,

Well, I'm unfortunately not familiar with WebSVN.

However, have you considered Virtualmin's SVN plugin?

You can install that by running:

apt-get install webmin-virtualmin-svn

That will allow you to setup Subversion repositories using Virtualmin.

-Eric

Mon, 06/24/2013 - 10:06
loic.etibe

Hello and thank you for your reply.

I actually already have my repositories handled by Virtualmin on my host. I just need to install a 3rd party software to display versioned sources in a more friendly way.

It's a lot like a PhpMyAdmin install except there's no built-in scripts to do the work from within Virtualmin.

This means I have to deal with Apache config files myself and this is where I get stuck.

Mon, 06/24/2013 - 11:12
andreychek

Howdy,

Yeah, unfortunately, it doesn't normally work to globally setup a script such as that, and have it work for all the domains on your server.

The domains you have setup on your server are designed to work differently than what the package you installed expects.

Taking a quick peek at the installation docs, it appears that you wouldn't need to edit the Apache config.

Just place the source in your public_html folder (or a sub-directory), and edit the include/config.php file to define your repositories.

When you download the WebSVN source, you can see the installation guide in docs/install.html.

-Eric

Tue, 06/25/2013 - 05:10 (Reply to #4)
loic.etibe

Thank you Eric, I think I understand a little bit better how all of this works.

The phpMyAdmin folder is here too, so I assume that Install Scripts are actually doing these actions for each configured domain.

edit: everything is now working as expected :-)

I softlinked /public_html/websvn/ to /usr/share/websvn so I can keep my files up to date. Then I configured Virtualmin to use my SVN's basic htpasswd authentication on /websvn Location and edited WebSVN's config file to use SVN's authz conf file to handle all the per repository user authorization.

Working like a charm !

Tue, 06/25/2013 - 06:41
Locutus

Be aware that, if you use FCGId, the suexec that comes with Virtualmin is compiled to execute PHP scripts only from /home/*. So you MIGHT run into trouble if your PHP scripts are located elsewhere.

Tue, 06/25/2013 - 07:58 (Reply to #6)
loic.etibe

Thanks for this warning Locutus.

What kind of exploits can be used with that scenario ? Is it a real threat for a secured directory ?

So the only clean way to do this is to paste the source code in /public_html ? How do you keep your files up to date ?

Tue, 06/25/2013 - 09:25
Locutus

What scenario exactly are you referring to?

Tue, 06/25/2013 - 09:46
loic.etibe

Having a link in my public_html pointing to an external folder.

This is in my /home/host/public_html/ :

websvn -> /usr/share/websvn/

Topic locked