it:linux:debian:apache

Apache

  • 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
    ...
#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
NameVirtualHost *:80

<VirtualHost *:80>
  ServerName sepp.example.com
  ServerAlias *.sepp.example.com
  DocumentRoot /home/sepp/vhosts/sepp.example.com
</VirtualHost>
...
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
<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
  • it/linux/debian/apache.txt
  • Zuletzt geändert: 2015/12/24 14:26
  • von 127.0.0.1