You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Albert Krawczyk <u4...@anu.edu.au> on 2006/08/07 01:04:13 UTC
Debian install in site subdirectory
Hi,
I'd like to start of by saying that I'm sorry if I'm asking stupid
questions but I've spent too much time trying to do my own research on
this topic already.
I'm a windows user (insert flaming here) and have recently started working
with a new team on developing a site. We have the site running in Apache2
at
root/public/website
I installed subversion and related tools using
>apt-get install subversion subversion-tools
etc.
My question is, can someone in idiot speak explain to me how to set up
subversion to run from;
root/public/website/subversion
the reason i need it to run from a sub directory of the main site is that
i only have one domain-name that maps to /public/website/ and i can't get
another one just for subversion,
I'd like to say i have a limited (read: near-zero) knowledge of the
debian/Linux command line, and i do apologise for the stupidity of the
question, but I'm hoping for some help,
anyway, thanks for all your help in advance,
Albert
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: Debian install in site subdirectory
Posted by Bob Proulx <bo...@proulx.com>.
Ryan Schmidt wrote:
> Albert Krawczyk wrote:
> I'm not sure where it is in Debian or whatever Linux you're running,
> but somewhere there will be a configuration file for Apache, often
> called httpd.conf or apache.conf or something like that. In this file
Debian supports both apache version 1 and apache version 2
installations. I highly recommend using the "apache2" which is the
version 2 installation. But some users are still using the older
"apache" which is version 1 for reasons of their own. The style of
the configurations have changed between releases.
Using the "apache2" package on Debian the configuration file is
installed as a modular set of configuration files to make setting up
either standalone or virtual hosts very easy. In the case of virtual
hosts each virtual host will be in its own file. The files are
installed at /etc/apache2/sites-available/ with the default host
configuration in a default file and virtual host configurations in
files that you name and create there.
These are concatenated with the /etc/apache2/apache2.conf,
/etc/apache2/httpd.conf and the directory of /etc/apache2/conf.d/*
files. That list of multiple locations is there for compatibility
reasons. If a user wants to use the older configuration style they
can put all of their configuration in the httpd.conf file, for
example, and everything will work fine.
Of course this is off-topic for this list. More Debian specific help
can be found on the debian-users mailing list at lists.debian.org.
> there might be a virtual host for your main site, which might look
> something like this:
>
> <VirtualHost *:80>
> ServerName www.example.com
> DocumentRoot /root/public/website
> </VirtualHost>
>
> If your server doesn't use virtual hosts, then it'll be the same
> except the two lines <VirtualHost *:80> and </VirtualHost> won't be
> present.
Debian configures virtual hosts by default. Those lines will be in
the sites-available/default file.
> The repository files should be owned by the user Apache runs under,
> which depending on the server OS might be nobody, www, apache, or
> something else. Look for the line in the httpd.conf that starts
> with "User "; that'll tell you.
On Debian the default user running the apache web server is the
"www-data" user. This is set in the /etc/apache2/apache2.conf file.
Bob
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: Debian install in site subdirectory
Posted by Ryan Schmidt <su...@ryandesign.com>.
On Aug 7, 2006, at 03:04, Albert Krawczyk wrote:
> I'd like to start of by saying that I'm sorry if I'm asking stupid
> questions but I've spent too much time trying to do my own research on
> this topic already.
Don't worry; it can be tricky to get right!
> I'm a windows user (insert flaming here) and have recently started
> working
> with a new team on developing a site. We have the site running in
> Apache2
> at
> root/public/website
>
> I installed subversion and related tools using
>> apt-get install subversion subversion-tools
> etc.
The server is then not Windows, I gather? Debian Linux perhaps?
> My question is, can someone in idiot speak explain to me how to set up
> subversion to run from;
>
> root/public/website/subversion
Well, if we're talking about filesystem paths here (and not web site
paths), then you should absolutely not put the repository files
there. You should put them anywhere else: anywhere outside of the web
server document root is fine. For example, at work, we have our
intranet site served from /data/vhosts/intranet/htdocs and the
repository in /data/svn/repo.
> the reason i need it to run from a sub directory of the main site
> is that
> i only have one domain-name that maps to /public/website/ and i
> can't get
> another one just for subversion,
There's nothing wrong with running the repository from a subdirectory
of the main site, *in terms of web site URLs*. In terms of filesystem
paths, though, they should not overlap, as stated above.
I'm not sure where it is in Debian or whatever Linux you're running,
but somewhere there will be a configuration file for Apache, often
called httpd.conf or apache.conf or something like that. In this file
there might be a virtual host for your main site, which might look
something like this:
<VirtualHost *:80>
ServerName www.example.com
DocumentRoot /root/public/website
</VirtualHost>
If your server doesn't use virtual hosts, then it'll be the same
except the two lines <VirtualHost *:80> and </VirtualHost> won't be
present.
You just need to put your repository somewhere (anywhere other than
inside /root/public/website)—let's say you put it in /root/public/
subversion. Then you add some lines to the virtual host so it looks
like this:
<VirtualHost *:80>
ServerName www.example.com
DocumentRoot /root/public/website
<Location /subversion>
DAV svn
SVNPath /root/public/subversion
#SVNPathAuthz off
#SVNIndexXSLT /svnrsrc/index.xslt
AuthType Basic
AuthName "Example Repositories"
AuthUserFile /root/public/subversion/conf/users
Require valid-user
</Location>
</VirtualHost>
Assuming you want people to log in with usernames and passwords, you
would need the Auth and Require lines at the end of the Location
block and to set up the file /root/public/subversion/conf/users with
user authentication information. You create this file with the
htpasswd program from Apache. You could also use LDAP or other
authentication means; consult the Apache documentation if you want that.
SVNPathAuthz off is a performance improvement you can use if you
don't plan to restrict access to parts of the repository to specific
users (that is: if everybody is going to be allowed to access
everything in the repository).
The SVNIndexXSLT directive is if you want to customize the appearance
of the directory index you see in the web browser.
The repository files should be owned by the user Apache runs under,
which depending on the server OS might be nobody, www, apache, or
something else. Look for the line in the httpd.conf that starts with
"User "; that'll tell you. If for example it says "User nobody" then
you should make the repository owned by "nobody":
sudo chown -R nobody /root/public/subversion
Probably also best if that's the only user that can see the
repository files:
sudo chmod -R go-rwx /root/public/subversion
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org