Commit a9aba585 authored by Alain Takoudjou's avatar Alain Takoudjou

slaprunner: remove redirect the user to account creation page from nginx config

parent 445a6b90
......@@ -110,7 +110,7 @@ recipe = hexagonit.recipe.download
ignore-existing = true
url = ${:_profile_base_location_}/nginx_conf.in
download-only = true
md5sum = 94d83ef3eb89c2d75c8c079ab12b4518
md5sum = 2b06f7eb9a1d45d250d4b92a944db925
filename = nginx_conf.in
mode = 0644
......
......@@ -35,21 +35,6 @@ http {
scgi_temp_path {{ param_tempdir['scgi_temp_path'] }};
location / {
# When no .htpasswd exist, redirect the user to account creation page
if ( !-f {{ param_nginx_frontend['etc_dir'] }}/.htpasswd ) {
# redirect URL is different wether nginx is accessed directly or behind apache.
# nginx does not support nested if or multiple conditions, so we use this well known hack.
set $test no_htpasswd;
}
if ( $host = [{{ param_nginx_frontend['global-ip'] }}] ) {
set $test "${test}_backend_access";
}
if ( $test = no_htpasswd) {
return 301 $scheme://$host/setAccount ;
}
if ( $test = no_htpasswd_backend_access) {
return 301 /setAccount ;
}
auth_basic "Restricted";
auth_basic_user_file {{ param_nginx_frontend['etc_dir'] }}/.htpasswd;
proxy_redirect off;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment