You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

60 lines
991 B

server {
listen 80;
server_name ~^flower.+;
root /dev/null;
access_log off;
error_log /dev/stdout;
log_not_found off;
location / {
proxy_pass http://127.0.0.1:5555;
proxy_set_header Host $host;
proxy_redirect off;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
}
server {
listen 80 default_server;
root /app/web/build;
client_max_body_size 20m;
location ~ \/\..* {
return 404;
}
location /static/ {
alias /app/static/;
expires 1y;
}
location /media/ {
alias /app/media/;
expires 1y;
try_files $uri @prod;
}
location @prod {
if ($host = "lil.school") {
return 404;
}
proxy_pass https://lil.school;
proxy_buffering off;
}
location / {
try_files $uri @django;
}
location @django {
include uwsgi_params;
uwsgi_pass 127.0.0.1:9090;
}
}