forked from ScoDoc/ScoDoc
Modif config nginx pour servir static statiquement
This commit is contained in:
parent
4e836e61d3
commit
30b5d4bfa3
@ -1 +1 @@
|
|||||||
Static content served directly by Apache.
|
Static content served directly by nginx.
|
||||||
|
@ -28,10 +28,17 @@ server {
|
|||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
}
|
}
|
||||||
|
location /ScoDoc/static {
|
||||||
location /static {
|
|
||||||
# handle static files directly, without forwarding to the application
|
# handle static files directly, without forwarding to the application
|
||||||
alias /opt/scodoc/app/static;
|
alias /opt/scodoc/app/static;
|
||||||
expires 5d;
|
expires 1d;
|
||||||
|
}
|
||||||
|
location /ScoDoc/static/bootstrap {
|
||||||
|
# (temp.) exception: home page using flask_bootstrap !
|
||||||
|
proxy_pass http://localhost:8000;
|
||||||
|
proxy_redirect off;
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user