29 lines
626 B
Plaintext
29 lines
626 B
Plaintext
server {
|
|
listen 80;
|
|
server_name localhost;
|
|
|
|
client_max_body_size 128M;
|
|
|
|
# serve media files
|
|
location /recipes/media/ {
|
|
alias /media/;
|
|
}
|
|
location /recipes/static/ {
|
|
alias /static/;
|
|
}
|
|
# pass requests for dynamic content to gunicorn
|
|
location / {
|
|
proxy_set_header Host $http_host;
|
|
proxy_pass http://tandoor:8080;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header X-Script-Name /recipes;
|
|
proxy_cookie_path / /recipes;
|
|
|
|
error_page 502 /errors/http502.html;
|
|
}
|
|
|
|
location /recipes/errors/ {
|
|
alias /etc/nginx/conf.d/errorpages/;
|
|
internal;
|
|
}
|
|
} |