location /static/ { alias __PUBLIC_PATH__/static/; expires 30d; } # TODO: django-sendfile2: #location __PATH__/media/ { # # DATA_DIR/media/ # alias __PUBLIC_PATH__/media/; # expires 30d; #} location / { # this is needed if you have file import via upload enabled client_max_body_size 100M; proxy_http_version 1.1; proxy_set_header Host $host; proxy_set_header X-Forwarded-For $remote_addr; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Forwarded-Protocol $scheme; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Cert-Hash $ssl_client_fingerprint; proxy_set_header X-SSL-Protocol $ssl_protocol; proxy_set_header X-Scheme $scheme; proxy_read_timeout 30; proxy_send_timeout 30; proxy_connect_timeout 30; proxy_redirect off; set $upstream http://127.0.0.1:__PORT__/; proxy_pass $upstream; # Include SSOWAT user panel. #include conf.d/yunohost_panel.conf.inc; }