3

I've installed Subversion Edge on my server. Let's say that my website is myweb.com. To access the main repository (called main) users have to go to https://myweb.com/svn/main. Alternatively they can go to https://myweb.com/viewvc to view all the repos. If they want to login and change their password they have to go to https://myweb.com:4434. I would like to have the request for https://myweb.com resolve to this login page rather than a page which simply says "It works!".

Is this possible though Apache and or Subversion Edge configuration?

EDIT: I've added this to my httpd.conf. When I point my browser at https://myweb.com/ach it just hangs.

LoadModule proxy_module lib/modules/mod_proxy.so
LoadModule proxy_http_module lib/modules/mod_proxy_http.so

ProxyPreserveHost On
ProxyPass /ach http://myweb.com:4434/
ProxyPassReverse /ach http://myweb.com:4434/

#ProxyPreserveHost On
#<Location /agh>
#       ProxyPass https://myweb.com:4434/
#       ProxyPassReverse http://myweb.com:4434/
#</Location>
chew socks
  • 1,406
  • 2
  • 17
  • 37

2 Answers2

2

I believe you wanted to run Edge console on the default standard port on either http (port 80) or https(port 443). Standard ports require additional setup. Two options exist to allow use of port 80 or 443. Only one or the other is necessary and both require root privileges to setup.

Method 1 : Use bind helper application.

httpd_bind is a small application included with CollabNet Subversion Edge to allow the server access to the standard ports without the server itself running with elevated privileges. In order for it to work, httpd_bind must be owned by root and have its suid bit set such as shown by the commands below. These must be executed as root or sudo.

chown root:jeyanthan /path/to/csvn/lib/httpd_bind/httpd_bind chmod u+s /path/to/csvn/lib/httpd_bind/httpd_bind

Note : 'jeyanthan' is the username with which the application is untarred.

Method 2: Start httpd under sudo

The svn server can be started with root privileges allowing it to bind to the port, after which the server will reduce its privileges. To use this method and allow starting and stopping the server from the management console, setup sudo for the httpd binary to work without a password.

Use "/usr/sbin/visudo" to add the following two lines to the end of the sudoers file:

Defaults env_keep += "PYTHONPATH" jeyanthan ALL=(ALL) NOPASSWD: /path/to/csvn/bin/httpd

Jeyanthan I
  • 1,611
  • 15
  • 28
  • 1
    Correct me if I'm wrong, but this is to get the main Apache server running on a standard port. But Apache is a different server than the Console server. – chew socks Sep 26 '14 at 17:03
1

The Subversion Edge administration web app that is running on https://myweb.com:4434 is served by an embedded web server (Tomcat, I think).

So, you can set up an Apache reverse proxy from https://myweb.com/ to https://myweb.com:4434/

However, you need to do this without affecting the existing paths under https://myweb.com/svn/ and https://myweb.com/viewvc/ so it is a bit tricky. I suggest breaking this into two parts:

First, set up a reverse proxy from https://myweb.com/admin/ to https://myweb.com:4434/, then once that is working, set up a redirect or a rewrite rule from https://myweb.com/ to https://myweb.com/admin/

Both of these can be done in the Apache config.

Richard Neish
  • 8,414
  • 4
  • 39
  • 69
  • I've been try to set this up, but haven't gotten it to work. I added what I've tried to my question. – chew socks Sep 25 '14 at 21:45
  • OK, it might be a problem with trying to point the proxy at the Subversion Edge HTTPS url. Try allowing http:// access to Subversion Edge, then point the Apache reverse proxy at that URL instead. – Richard Neish Sep 29 '14 at 11:59