diff --git a/group_vars/otree_servers.yml.example b/group_vars/otree_servers.yml.example index 1c9db4dc812f2cc98a3ce2e14a69645ac7635e82..5670fca8c3ec8723b579faf545ea84555cb2d06e 100755 --- a/group_vars/otree_servers.yml.example +++ b/group_vars/otree_servers.yml.example @@ -7,6 +7,7 @@ home_path: "/home" nginx_config_path: "/etc/nginx" nginx_sites_available: "{{ nginx_config_path }}/sites-available" nginx_sites_enabled: "{{ nginx_config_path }}/sites-enabled" +default_redirection: "https:// mydomain " otree_domain: "company.org" # fqdn of the otree parent domain diff --git a/templates/nginx_default_site.conf.j2 b/templates/nginx_default_site.conf.j2 index 22eb9a2fa8d030b7e739572b4583a213b85cd2c3..02e732dea238f740d3a9693fa82ba72374029f71 100755 --- a/templates/nginx_default_site.conf.j2 +++ b/templates/nginx_default_site.conf.j2 @@ -21,7 +21,7 @@ server { ssl_certificate_key {{ ssl_certificate_key_path }}; location / { - return 403; + return 301 {{ default_redirection }}; } } diff --git a/templates/nginx_site.conf.j2 b/templates/nginx_site.conf.j2 index b64b6717de3f3977a536cf7eeeb49a5ccb7ccca4..81a54e1a3311676b9d31ca0e73a5f09e96de17f1 100755 --- a/templates/nginx_site.conf.j2 +++ b/templates/nginx_site.conf.j2 @@ -13,6 +13,10 @@ server { ssl_certificate {{ ssl_certificate_path }}; ssl_certificate_key {{ ssl_certificate_key_path }}; + location = /favicon.ico { + alias /var/www/media/images/favicon.ico; + } + location / { access_log off; proxy_pass http://127.0.0.1:{{ item.value.port }};