aboutsummaryrefslogtreecommitdiffstats
path: root/roles/httpd/templates
diff options
context:
space:
mode:
authorbinary <me@rgoncalves.se>2021-01-24 16:42:45 +0100
committerbinary <me@rgoncalves.se>2021-01-24 16:42:45 +0100
commit6f402c3dfbc3d4702c1b758f60afbec912ca2c24 (patch)
treeee98dc68de6b0f8ec1110092994b68ef954ac0bd /roles/httpd/templates
parent461f8a25fadd7e86640a4db1b87a0eef7636d443 (diff)
downloadinfrastructure-6f402c3dfbc3d4702c1b758f60afbec912ca2c24.tar.gz
Force http to https with httpd block return from relayd
Diffstat (limited to 'roles/httpd/templates')
-rw-r--r--roles/httpd/templates/httpd.conf.j29
1 files changed, 9 insertions, 0 deletions
diff --git a/roles/httpd/templates/httpd.conf.j2 b/roles/httpd/templates/httpd.conf.j2
index 45b46c3..9a028f9 100644
--- a/roles/httpd/templates/httpd.conf.j2
+++ b/roles/httpd/templates/httpd.conf.j2
@@ -12,6 +12,15 @@ types {
image/png png
}
+{% if ansible_host == global.dcontroller %}
+server "default" {
+ listen on localhost port 8888
+ location * {
+ block return 302 "https://\$HTTP_HOST\$REQUEST_URI"
+ }
+}
+{% endif %}
+
{% for file in configurations.files %}
include "{{ file.path }}"
{% endfor %}
remember that computers suck.