fix initial nginx ssl deployment in ansible playbook

This commit is contained in:
j3d1 2024-01-07 17:36:35 +01:00
parent 8f7c037606
commit 258065eec3
4 changed files with 50 additions and 16254 deletions

View file

@ -12,9 +12,6 @@ server {
server_name {{ web_domain }};
client_max_body_size 1024M;
auth_basic C3LF;
auth_basic_user_file conf.d/lf-prod.htpasswd;
location / {
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS, DELETE, PUT';
@ -32,7 +29,7 @@ server {
proxy_pass http://c3lf-sys3;
}
location /api {
location ~ ^/(api|media)/ {
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
@ -41,6 +38,11 @@ server {
proxy_redirect off;
proxy_buffering off;
proxy_pass http://c3lf-sys3;
location ~ ^/api/1 {
auth_basic C3LF;
auth_basic_user_file conf.d/lf-prod.htpasswd;
}
}
location /djangoadmin {