v0.1 done: docker webhosts, smtp gateway
This commit is contained in:
17
roles/webserver/files/apache-site.conf
Normal file
17
roles/webserver/files/apache-site.conf
Normal file
@ -0,0 +1,17 @@
|
||||
<IfModule mod_ssl.c>
|
||||
<VirtualHost _default_:443>
|
||||
ServerAdmin webmaster@kmlabz.com
|
||||
|
||||
DocumentRoot /var/www/html
|
||||
|
||||
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
|
||||
|
||||
ProxyPass "/" "http://127.0.0.1:8080/" retry=1 acquire=3000 timeout=600 Keepalive=On
|
||||
ProxyPassReverse "/" "http://127.0.0.1:8080/"
|
||||
</VirtualHost>
|
||||
</IfModule>
|
23
roles/webserver/tasks/apache.yaml
Normal file
23
roles/webserver/tasks/apache.yaml
Normal file
@ -0,0 +1,23 @@
|
||||
---
|
||||
- name: "Install Apache via apt"
|
||||
apt:
|
||||
update_cache: yes
|
||||
state: present
|
||||
name:
|
||||
- apache2
|
||||
|
||||
- name: Upload site config to destination
|
||||
copy:
|
||||
src: apache-site.conf
|
||||
dest: /etc/apache2/sites-available/site.conf
|
||||
mode: 644
|
||||
owner: root
|
||||
|
||||
- name: Enable site
|
||||
command: a2ensite site.conf
|
||||
|
||||
- name: Enable and restart Apache2 daemon
|
||||
service:
|
||||
name: apache2
|
||||
state: restarted
|
||||
enabled: yes
|
Reference in New Issue
Block a user