Apache2 - mehrere vhost und nur https

mardi 3 novembre 2015

Hi,

ich habe einen vserver, auf dem ich Ubuntu 14.04 LTS, seafile und baikal installiert habe, und nun mit der config scheitere...
Ich möchte gerne, dass alle Verbindungen auf Port 80 kommen auf https umgeleitet werden, dass durchgehend SSL benutzt wird.
Das Zertifikat ist ein self-signed, das würde ich dann noch austauschen und an einen vernünftigen Pfad schieben.
Aktuell lande ich, sobald ich https:// vor die Adresse schreibe, auf dem seafile, auch ohne die Subdomain "paluu" zu benutzen.

Kann jemand helfen?

Meine config-files sehen so aus:

Code:

ll /etc/apache2/sites-enabled
lrwxrwxrwx 1 root root  50 Nov  3 07:46 iigu.uugoma.com.conf -> /etc/apache2/sites-available/iigu.uugoma.com.vhost
lrwxrwxrwx 1 root root  51 Nov  2 15:22 paluu.uugoma.com.conf -> /etc/apache2/sites-available/paluu.uugoma.com.vhost
lrwxrwxrwx 1 root root  45 Nov  2 15:33 uugoma.com.conf -> /etc/apache2/sites-available/uugoma.com.vhost

ll /etc/apache2/sites-available
-rw-r--r-- 1 root root 6437 Jan  7  2014 default-ssl.conf
-rw-r--r-- 1 root root  370 Nov  3 08:45 iigu.uugoma.com.vhost
-rw-r--r-- 1 root root  737 Nov  3 08:42 paluu.uugoma.com.vhost
-rw-r--r-- 1 root root  93 Nov  3 08:45 uugoma.com.vhost

cat /etc/apache2/sites-available/uugoma.com.vhost
<VirtualHost *:80>
    ServerName uugoma.com
    DocumentRoot /var/www/uugoma
</VirtualHost>

cat /etc/apache2/sites-available/iigu.uugoma.com.vhost
<VirtualHost *:80>

        DocumentRoot /var/www/baikal
        ServerName iigu.uugoma.com

        RewriteEngine On
        RewriteRule /.well-known/carddav /card.php [R,L]
        RewriteRule /.well-known/caldav /cal.php [R,L]

        <Directory "/var/www/http://ift.tt/1Na1Zr0;
                Options None
                Options +FollowSymlinks
                AllowOverride All
        </Directory>

</VirtualHost>

cat /etc/apache2/sites-available/paluu.uugoma.com.vhost
<VirtualHost *:443>
  ServerName paluu.uugoma.com
  DocumentRoot /var/www
  Alias /media  /home/seafile/haiwen/seafile-server-latest/seahub/media

  SSLEngine On
  SSLCertificateFile /home/seafile/haiwen/certificates/cacert.pem
  SSLCertificateKeyFile /home/seafile/haiwen/certificates/privkey.pem

  RewriteEngine On
  <Location /media>
  Require all granted
  </Location>
  #
  # seafile httpserver
  #
  ProxyPass /seafhttp http://127.0.0.1:8082
  ProxyPassReverse /seafhttp http://127.0.0.1:8082
  RewriteRule ^/seafhttp - [QSA,L]
  #
  # seahub
  #
  RewriteRule ^/(media.*)$ /$1 [QSA,L,PT]
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteRule ^(.*)$ /seahub.fcgi$1 [QSA,L,E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
</VirtualHost>

Vielen Dank!


0 commentaires:

Enregistrer un commentaire

 

Lorem

Ipsum

Dolor