diff options
author | binary <me@rgoncalves.se> | 2021-01-23 12:30:40 +0100 |
---|---|---|
committer | binary <me@rgoncalves.se> | 2021-01-23 12:30:40 +0100 |
commit | 6449e467ea5bce7b8639256d05b22a6a2e0a2c83 (patch) | |
tree | 41f59a47b20f2f1bc97f1d8ce41c03a68a24e9ac /roles/website/templates | |
parent | aa2710ec320b5744405c26d216db039a57dc4c0e (diff) | |
download | infrastructure-6449e467ea5bce7b8639256d05b22a6a2e0a2c83.tar.gz |
Basic http-only website configuration
Diffstat (limited to 'roles/website/templates')
-rw-r--r-- | roles/website/templates/httpd.conf.j2 | 19 |
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" +} + |