From 6449e467ea5bce7b8639256d05b22a6a2e0a2c83 Mon Sep 17 00:00:00 2001 From: binary Date: Sat, 23 Jan 2021 12:30:40 +0100 Subject: Basic http-only website configuration --- roles/website/templates/httpd.conf.j2 | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 roles/website/templates/httpd.conf.j2 (limited to 'roles/website/templates') 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" +} + -- cgit v1.2.3