permalink

6

Centos + Cpanel + Subversion + Apache 2 + Proxy works

My mission was install subversion on our server withour breaking cpanel. After so much googling I was able to do it. It took me like a week to figure out a method which will work without any issues on cpanel. The main issue was cpanel still doesn’t support apache 2 series. They do have support on edge version but it is highly unstable and doesn’t compile all the needed modules for php. In apache 1.3 the support for mod_dav is not very good. The only alternative for subversion was to use apache 2 series. So I started digging for articles.

I found there is a method to install both apache 1.3 and apache 2 together. Only thing is we have to use another port than 80 for apache 2. Let me go step by step like how I installed subversion.

1. Install subversion : This was really easy on centos. I just have to use yum and it does it all.

This will install all libraries needed for subversion to work. Sometimes you may come across an issue with perl-uri. Just Google for “perl uri rpm” and you can download an install the same. In my case I had to download and install.

2. The next thing was to create a repository.

With above commands I created a subversion repo named source. You can check inside the directory if lot of files are created. If created subversion works fine ;-).

3. Now we can proceed with apache 2 installation. I choosed apache 2.0.59

Apache2 installed at port 2080 with dav , proxy and rewrite and started so simple ;-).

4. Now we have to compile mod_svn for apache 2. For this I had to download the source of subversion. Please check the version of subversion installed. You can check with the help of yum.

Next download the same of subversion source and you need to compile mod_svn.

Now mod_svn is installed and activated on apache2. We can configure apache 2 to serve svn files with the help of mod_dav.

5. Configure apache 2 for svn. To do this I had to change the settings httpd.conf of apache 2. This file will be located here /usr/local/apache2/conf/httpd.conf

Restart apache2 once you made the above changes. Now you should be able to see the svn files from this url http://localhost:2080/svn/. You should be able to see the subversion files at revision 0. There is will be nothing in it as we have not added any files.

6. Now we have add proxy to apache 1.3 so that we can internally proxy the files between apache 2 and apache 1. You can download the source of currently installed apache 1.3 or you can find the same in /home/installd/buildapache/apache_1.3.xx/src/modules/proxy
Just goto that directory and run this command

That will install mod_proxy to apache 1.3

7. You have add this setting to apache 1.3 conf file to proxy the http://localhost:2080/svn/ in standard port 80 of some website.
Add these line to any virtual host present in the conf file.

I had added for the virtual host svn.imthi.com.

You can view my subversion at http://svn.imthi.com/ username : guest and password : guest.

All done. If you wish add authentication you can Google on how to add simple http authentication. You can even add policies if you want. The final setting should look something like this with authentication and polices

For this svn book will be of great use. Have fun …!!! 😉

6 Comments

  1. Pingback: Planeta CentOS » Centos + Cpanel + Subversion + Apache 2 + Proxy works

  2. Pingback: Installazione: cPanel + Subversion + Apache 2 | blog.morphey.org

  3. Excellent Article. I have been in webhosting field for several years. I never know that we can install 2 apache on same server.

    Learned and made it work today….. 🙂

  4. It took me like a week to figure out a method which will work without any issues on cpanel. The main issue was cpanel still doesn’t support apache 2 series. They do have support on edge version but it is highly unstable and doesn’t compile all the needed modules for php.