add basic auth
This commit is contained in:
parent
378351e430
commit
efe277db2a
1
roles/nginx/files/kipasswd
Normal file
1
roles/nginx/files/kipasswd
Normal file
@ -0,0 +1 @@
|
|||||||
|
dev:$apr1$btDCHvFb$g/e8.gemqHTdLzKBtUDjW1
|
@ -2,10 +2,13 @@
|
|||||||
apt:
|
apt:
|
||||||
name: nginx
|
name: nginx
|
||||||
|
|
||||||
- name: be sure the nginx config file is present
|
- name: be sure the nginx files are present
|
||||||
copy:
|
copy:
|
||||||
src: ../files/nginx.conf
|
src: "../files/{{ item }}"
|
||||||
dest: /etc/nginx/nginx.conf
|
dest: "/etc/nginx/{{ item }}"
|
||||||
|
with_items:
|
||||||
|
- nginx.conf
|
||||||
|
- kipasswd
|
||||||
|
|
||||||
- name: be sure nginx site config files are present
|
- name: be sure nginx site config files are present
|
||||||
template:
|
template:
|
||||||
|
@ -25,6 +25,9 @@ server {
|
|||||||
}
|
}
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
|
auth_basic "KI";
|
||||||
|
auth_basic_user_file /etc/nginx/kipasswd;
|
||||||
|
|
||||||
proxy_pass http://localhost:{{ ki_frontend_port }};
|
proxy_pass http://localhost:{{ ki_frontend_port }};
|
||||||
proxy_set_header Host $http_host;
|
proxy_set_header Host $http_host;
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
Loading…
Reference in New Issue
Block a user