Ursprung
Commit
f2deb21f9f
2 geänderte Dateien mit 30 neuen und 2 gelöschten Zeilen
  1. +9
    -0
      tasks/main.yml
  2. +21
    -2
      templates/default-vhost.j2

+ 9
- 0
tasks/main.yml Datei anzeigen

@@ -2,6 +2,15 @@

- include: setup_Debian.yml

- name: enable modules
apache2_module:
name: "{{item}}"
state: present
with_items:
- php7.0
- rewrite
- ssl

- name: default vhost
template:
src: default-vhost.j2


+ 21
- 2
templates/default-vhost.j2 Datei anzeigen

@@ -1,10 +1,29 @@
<VirtualHost *:443>

ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined

SSLEngine on
SSLCertificateFile "/etc/ssl/certs/ssl-cert-snakeoil.pem"
SSLCertificateKeyFile "/etc/ssl/private/ssl-cert-snakeoil.key"

</VirtualHost>

<VirtualHost *:80>

ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
DocumentRoot /var/www/html/
<Directory "/var/www/html/">

DocumentRoot /var/www/default/
<Directory "/var/www/default/">
Options -Indexes
</Directory>

#RewriteEngine On
#RewriteCond %{REQUEST_FILENAME} !-f
#RewriteCond %{REQUEST_FILENAME} !-d
#RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]

</VirtualHost>

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet

Laden…
Abbrechen
Speichern