Add httpd setup and role for docker proxy in Apache2
This commit is contained in:
parent
290fc43f54
commit
07c53212a0
4 changed files with 80 additions and 0 deletions
roles/setup-http-site-proxy/templates
|
@ -0,0 +1,30 @@
|
|||
<VirtualHost {{ ansible_default_ipv4.address }}:80>
|
||||
ServerAdmin {{ server_admin }}
|
||||
ServerName {{ site_name }}
|
||||
ServerAlias {{ site_name }}
|
||||
ErrorLog /var/log/apache2/{{ site_name }}-error.log
|
||||
CustomLog /var/log/apache2/{{ site_name }}-access.log common
|
||||
|
||||
<ifmodule mod_rewrite.c>
|
||||
RewriteEngine On
|
||||
RewriteCond %{REQUEST_URI} !^/\.well\-known/acme\-challenge/
|
||||
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
|
||||
</ifmodule>
|
||||
</VirtualHost>
|
||||
|
||||
<VirtualHost {{ ansible_default_ipv4.address }}:443>
|
||||
ServerAdmin {{ server_admin }}
|
||||
ServerName {{ site_name }}
|
||||
ServerAlias {{ site_name }}
|
||||
|
||||
ErrorLog /var/log/apache2/{{ site_name }}-error.log
|
||||
CustomLog /var/log/apache2/{{ site_name }}-access.log common
|
||||
|
||||
SSLEngine on
|
||||
SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown
|
||||
SSLCertificateFile /usr/local/etc/dehydrated/certs/{{ site_name }}/cert.pem
|
||||
SSLCertificateKeyFile /usr/local/etc/dehydrated/certs/{{ site_name }}/privkey.pem
|
||||
SSLCertificateChainFile /usr/local/etc/dehydrated/certs/{{ site_name }}/chain.pem
|
||||
|
||||
ProxyPass / http://localhost:{{proxy_port}}/
|
||||
</VirtualHost>
|
Loading…
Add table
Add a link
Reference in a new issue