aboutsummaryrefslogtreecommitdiffstats
path: root/roles/httpd/templates/httpd.conf.j2
diff options
context:
space:
mode:
authorRomain Gonçalves <me@rgoncalves.se>2021-12-07 15:39:14 +0000
committerRomain Gonçalves <me@rgoncalves.se>2021-12-07 20:24:51 +0000
commit12cf22b1a8d9ad23809ad8048119a6920cbb9675 (patch)
tree9b7e4334497162c2e922e181eb8b01c57fc67e7f /roles/httpd/templates/httpd.conf.j2
parent333eff6a0aeefcbf573bbf5e725fc27b5b4cb9f6 (diff)
downloadrules-12cf22b1a8d9ad23809ad8048119a6920cbb9675.tar.gz
roles: Add httpd roles
Diffstat (limited to 'roles/httpd/templates/httpd.conf.j2')
-rw-r--r--roles/httpd/templates/httpd.conf.j231
1 files changed, 31 insertions, 0 deletions
diff --git a/roles/httpd/templates/httpd.conf.j2 b/roles/httpd/templates/httpd.conf.j2
new file mode 100644
index 0000000..6285d70
--- /dev/null
+++ b/roles/httpd/templates/httpd.conf.j2
@@ -0,0 +1,31 @@
+# managed by Ansible
+
+types {
+ text/css css
+ text/html html htm
+ text/plain txt pgp pub
+ image/gif gif
+ image/jpeg jpeg jpg
+ image/png png
+ image/svg+xml svg
+ application/xml xml rss
+}
+
+{% if inventory_hostname == __global_domain_controller %}
+server "default" {
+ listen on localhost port 8888
+
+ location "/.well-known/acme-challenge/*" {
+ root "/acme"
+ request strip 2
+ }
+
+ location * {
+ block return 302 "https://$HTTP_HOST$REQUEST_URI"
+ }
+}
+{% endif %}
+
+{% for file in configuration_files.files %}
+include "{{ file.path }}"
+{% endfor %}
remember that computers suck.