aboutsummaryrefslogtreecommitdiffstats
path: root/roles/website/templates
diff options
context:
space:
mode:
authorbinary <me@rgoncalves.se>2021-01-23 12:30:40 +0100
committerbinary <me@rgoncalves.se>2021-01-23 12:30:40 +0100
commit6449e467ea5bce7b8639256d05b22a6a2e0a2c83 (patch)
tree41f59a47b20f2f1bc97f1d8ce41c03a68a24e9ac /roles/website/templates
parentaa2710ec320b5744405c26d216db039a57dc4c0e (diff)
downloadinfrastructure-6449e467ea5bce7b8639256d05b22a6a2e0a2c83.tar.gz
Basic http-only website configuration
Diffstat (limited to 'roles/website/templates')
-rw-r--r--roles/website/templates/httpd.conf.j219
1 files changed, 19 insertions, 0 deletions
diff --git a/roles/website/templates/httpd.conf.j2 b/roles/website/templates/httpd.conf.j2
new file mode 100644
index 0000000..b1ce966
--- /dev/null
+++ b/roles/website/templates/httpd.conf.j2
@@ -0,0 +1,19 @@
+
+# httpd ~~ /etc/httpd.conf
+# managed by Ansible
+
+server "{{ global.domain_name }}" {
+ listen on * port 80
+ root "/htdocs/{{ global.domain_name }}"
+
+ location "/public/*" {
+ directory auto index
+ }
+
+}
+
+server "www.{{ global.domain_name }}" {
+ listen on * port 80
+ block return 301 "$REQUEST_SCHEME://{{ global.domain_name }}$REQUEST_URI"
+}
+
remember that computers suck.