Thursday
13
Jan 2005

Refuse access to .svn directories in Apache 2?

(10:12 pm) Tags: [Site, How do I..., Sysadmin]

From the documentation:

<Directory\~ “\.svn”>
Order allow,deny
Deny from all
</Directory>

Popularity: 24%

Comments: (0)

Move a Subversion repository from one machine to another

(6:05 pm) Tags: [Site, How do I..., Sysadmin]

Even if the machines are on different operating systems, this is dead easy. On the source machine, simply ‘dump’ the repository:

svnadmin dump /path/to/repo > reponame.dump
tar zcf reponame.tgz reponame.dump
scp reponame.tgz hostname:/path/to/new/repo

Then login to the new machine, and set up the new repo:

cd /path/to/new
svnadmin create reponame
tar zxf reponame.tgz
svnadmin load reponame < reponame.dump

That’s all there is to it. Then you can of course delete the dump files, the .tgz files, and even the source repo if you are brave.

Popularity: 95%

Comments: (24)

How to SSLify a site in Apache 2

(5:49 pm) Tags: [Site, How do I..., Sysadmin]

(Adapted to my needs from the original at http://www.apache-ssl.org/#FAQ)

First, you create the cert:

cd /www/conf
vi www.example.com.conf
openssl req -new > www.example.com.csr
mv privkey.pem www.example.com.privkey.pem
openssl rsa -in www.example.com.privkey.pem -out www.example.com.key
openssl x509 -in www.example.com.csr -out www.example.com.cert -req -signkey www.example.com.key -days 10000

Then, you edit the site config, adding the following lines:

SSLEngine on
SSLCertificateFile /www/conf/www.example.com.cert
SSLCertificateKeyFile /www/conf/www.example.com.key

Then, you restart apache, while crossing your fingers:

sudo /usr/local/apache2/bin/apachectl restart

Popularity: 24%

Comments: (0)