Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add htpasswd file and change balancer config to secure /admin pages #8

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions balancer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ FROM nginx:1.13.7
EXPOSE 80

COPY nginx.conf /etc/nginx/nginx.conf
COPY htpasswd /etc/htpasswd
1 change: 1 addition & 0 deletions balancer/htpasswd
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
elogy:$apr1$F/.6ZKei$TPtCM40dHh/cfwfKLBLa40
5 changes: 3 additions & 2 deletions balancer/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ http {
server {
listen 80;
server_name localhost;

location ^~ /api {
proxy_pass http://backend:80;
proxy_set_header HOST $host;
Expand All @@ -34,6 +33,8 @@ http {
location ^~ /admin {
proxy_pass http://backend:80;
proxy_set_header HOST $host;
auth_basic "Administrator's Area";
auth_basic_user_file /etc/htpasswd;
}

location ^~ /attachments {
Expand All @@ -51,4 +52,4 @@ http {
root html;
}
}
}
}