diff --git a/nginx.conf b/nginx.conf index c02c886ca..cfbdf705d 100644 --- a/nginx.conf +++ b/nginx.conf @@ -8,17 +8,22 @@ listen 443 ssl; server_name _; server_tokens off; - root /usr/share/pmm-server/landing-page; ssl_certificate /srv/nginx/certificate.crt; ssl_certificate_key /srv/nginx/certificate.key; ssl_trusted_certificate /srv/nginx/ca-certs.pem; ssl_dhparam /srv/nginx/dhparam.pem; - ## BEGIN Those lines are managed from entrypoint.sh - auth_basic off; - auth_basic_user_file .htpasswd; - ## END + # Authentification + set $root "/usr/share/pmm-server/landing-page"; + set $realm on; + if (!-f /srv/nginx/.htpasswd) { + set $root "/usr/share/pmm-server/password-page"; + set $realm off; + } + root $root; + auth_basic $realm; + auth_basic_user_file /srv/nginx/.htpasswd; # Grafana rewrite ^/graph$ /graph/; @@ -65,4 +70,9 @@ location /orchestrator { proxy_pass http://127.0.0.1:4000; } + + # Configurator + location /configurator { + proxy_pass http://127.0.0.1:7777; + } } diff --git a/password-page/fail.html b/password-page/fail.html deleted file mode 100644 index 04766e486..000000000 --- a/password-page/fail.html +++ /dev/null @@ -1,41 +0,0 @@ - - - -
-