1
0
mirror of https://gitlab.crans.org/bde/nk20 synced 2025-06-27 11:58:54 +02:00

Simplify NGINX examples

This commit is contained in:
Alexandre Iooss
2020-08-09 20:33:48 +02:00
parent 48d3e8960a
commit 9a52c81bff
2 changed files with 33 additions and 36 deletions

View File

@ -1,23 +1,27 @@
upstream note {
server 127.0.0.1:8000;
}
# This is an example NGINX site configuration for note_kfet in Docker
# Only HTTP, please use a reverse proxy to secure it!
server {
listen 80;
server_name note;
# Serve this site by default on HTTP
listen 80 default_server;
listen [::]:80 default_server;
location / {
proxy_pass http://note;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_redirect off;
}
# Max upload size
client_max_body_size 75M;
# Django statics and media
location /static {
alias /code/static/;
alias /code/static;
}
location /media {
alias /code/media;
}
location /media {
alias /code/media/;
# Send all non-media requests to the Django server.
location / {
proxy_pass http://127.0.0.1:8000;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_redirect off;
}
}