Konfigurieren von Apache und Lack mit SSL (Letsencrypt) in virtuellen Hosts auf einem Ubuntu 18-Server

517
fynbo

Jeg hat einen Ubuntu 18-Server, der mehrere virtuelle Hosts hostet, die Letsencrypt für die SSL-Zertifikate verwenden. Ich habe Varnish installiert, bezweifle aber, was ich tun muss, um SSL zu verwenden.

In habe /etc/apache2/sites-available/ich 2 Konfigurationen für jede Domäne.

example.com.conf und example.com-le-ssl.conf

example.com.conf

<VirtualHost *:8080> ServerAdmin webmaster@localhost ServerName example.com ServerAlias example.com DocumentRoot /var/www/examplecom <Directory /> AllowOverride All </Directory> <Directory /var/www/examplecom> Options Indexes FollowSymLinks MultiViews AllowOverride all Require all granted </Directory> ErrorLog /var/log/apache2/example.com-error.log LogLevel error CustomLog /var/log/apache2/example.com-access.log combined  RewriteEngine on RewriteCond % =example.com RewriteRule ^ https://%% [END,NE,R=permanent] </VirtualHost> 

example.com-le-ssl.conf

<IfModule mod_ssl.c> <VirtualHost *:443> ServerAdmin webmaster@localhost ServerName example.com ServerAlias example.com DocumentRoot /var/www/examplecom <Directory /> AllowOverride All </Directory> <Directory /var/www/examplecom> Options Indexes FollowSymLinks MultiViews AllowOverride all Require all granted </Directory> ErrorLog /var/log/apache2/example.com-error.log LogLevel error CustomLog /var/log/apache2/example.com-access.log combined  SSLCertificateFile /etc/letsencrypt/live/example.com/fullchain.pem SSLCertificateKeyFile /etc/letsencrypt/live/example.com/privkey.pem Include /etc/letsencrypt/options-ssl-apache.conf </VirtualHost> </IfModule> 

Welche Änderungen muss ich in example.com-le-ssl.conf vornehmen, damit Varnish mit SSL funktioniert ?

0

0 Antworten auf die Frage