Skip to content
Snippets Groups Projects
Commit c092cafd authored by Sébastien DA ROCHA's avatar Sébastien DA ROCHA :bicyclist:
Browse files

Update nginx.conf

parent b35b8a1c
No related branches found
No related tags found
No related merge requests found
......@@ -9,7 +9,7 @@ server {
client_max_body_size 4G;
location / {
location /api {
proxy_pass_header Set-Cookie;
proxy_set_header X-NginX-Proxy true;
proxy_set_header X-Real-IP $remote_addr;
......@@ -17,22 +17,36 @@ server {
proxy_set_header Host $host;
proxy_read_timeout 300s;
proxy_redirect off;
try_files $uri $uri/ /index.html;
if (!-f $request_filename) {
proxy_pass http://geocontrib_site;
break;
}
proxy_pass http://geocontrib_site;
}
location /api {
proxy_pass_header Set-Cookie;
proxy_set_header X-NginX-Proxy true;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_read_timeout 300s;
proxy_redirect off;
proxy_pass http://geocontrib_site;
}
location /static/ {
autoindex on;
alias /opt/geocontrib/static/;
}
location /media/ {
#autoindex on;
alias /opt/geocontrib/media/;
}
location / {
root /usr/share/nginx/html;
index index.html;
try_files $uri$args $uri/ /index.html;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment