Apache
SSL
Quick and Dirty
- Self-Signed:
make-ssl-cert generate-default-snakeoil --force-overwrite
- /etc/apache2/conf.d/ssl:
SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key
- VirtualHost:
... <VirtualHost *:443> SSLEngine on ...
Slow and Sane
#Private key (very secret). Do not use Passphrase openssl genrsa -des3 -out server.key 4096 #Remove Passphrase cp server.key server.key.org openssl rsa -in server.key.org -out server.key #Signing request openssl req -new -key server.key -out server.csr #Generate certificate openssl x509 -req -days 3650 -in server.csr -signkey server.key -out server.crt
Virtual Host
NameVirtualHost *:80 <VirtualHost *:80> ServerName sepp.example.com ServerAlias *.sepp.example.com DocumentRoot /home/sepp/vhosts/sepp.example.com </VirtualHost>
WebDAV
... DavLockDB /home/sepp/vhosts/svn/DavLock ... <Location /test2> AuthType Digest AuthName "Test" AuthDigestDomain /test2 AuthUserFile /home/sepp/digest Require valid-user Dav on </Location>
- DavLockDB muss mit user:group www-data:www-data angelegt sein
- Die digest-Datei anlegen mit:
htdigest -c digest Test user
WebDAV mit SVN support und autoversioning
<Location /svn/test> DAV svn SVNAutoversioning on SVNPath /home/sepp/vhosts/svn/test/ AuthType Basic AuthName "Test" AuthUserFile /home/sepp/basic Require valid-user </Location>
- unter /home/sepp/vhosts/svn/ muss mittels
svnadmin create test
ein Repository angelegt werden, auf das der Benutzer www-data:www-data Schreibzugriff hat
- Die basic-Datei anlegen mit:
htpasswd -c auth user