Features: 1) Add new /static/ and /media/ location blocks for serving static and media files.
Fixes: 1) Normalize spacing and indentation throughout `nginx.conf`. Extra: Improve readability and consistency of configuration file by aligning header and directive formatting.
This commit is contained in:
parent
cd2e6c31cf
commit
10434d8e2b
1 changed files with 82 additions and 77 deletions
15
nginx.conf
15
nginx.conf
|
|
@ -48,6 +48,16 @@ server {
|
||||||
default_type text/plain;
|
default_type text/plain;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
location /static/ {
|
||||||
|
add_header Access-Control-Allow-Origin "*";
|
||||||
|
root /var/jenkins/workspace/evibes;
|
||||||
|
}
|
||||||
|
|
||||||
|
location /media/ {
|
||||||
|
add_header Access-Control-Allow-Origin "*";
|
||||||
|
root /var/jenkins/workspace/evibes;
|
||||||
|
}
|
||||||
|
|
||||||
error_page 500 502 503 504 /maintenance.html;
|
error_page 500 502 503 504 /maintenance.html;
|
||||||
location = /maintenance.html {
|
location = /maintenance.html {
|
||||||
add_header Access-Control-Allow-Origin "*";
|
add_header Access-Control-Allow-Origin "*";
|
||||||
|
|
@ -137,11 +147,6 @@ server {
|
||||||
default_type text/plain;
|
default_type text/plain;
|
||||||
}
|
}
|
||||||
|
|
||||||
location /static/ {
|
|
||||||
add_header Access-Control-Allow-Origin "*";
|
|
||||||
root /var/jenkins/workspace/evibes;
|
|
||||||
}
|
|
||||||
|
|
||||||
location /favicon.ico {
|
location /favicon.ico {
|
||||||
add_header Access-Control-Allow-Origin "*";
|
add_header Access-Control-Allow-Origin "*";
|
||||||
root /var/jenkins/workspace/evibes/static;
|
root /var/jenkins/workspace/evibes/static;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue