mirror of
https://github.com/YunoHost-Apps/librephotos_ynh.git
synced 2024-09-03 19:36:12 +02:00
43 lines
1.1 KiB
Nginx Configuration File
43 lines
1.1 KiB
Nginx Configuration File
location / {
|
|
# React routes are entirely on the App side in the web broswer
|
|
# Always proxy to root with the same page request when nginx 404s
|
|
error_page 404 /;
|
|
proxy_intercept_errors on;
|
|
proxy_set_header Host $host;
|
|
proxy_pass http://localhost:__PORT__/;
|
|
}
|
|
location ~ ^/(api|media)/ {
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header Host backend;
|
|
include uwsgi_params;
|
|
#issue with IPV6 on ubuntu 20.04
|
|
#unicorn need to listen on [::1]
|
|
proxy_pass http://127.0.0.1:__BACKEND_PORT__;
|
|
}
|
|
|
|
# Django media
|
|
location /protected_media {
|
|
internal;
|
|
alias /home/yunohost.app/__NAME__/protected_media/;
|
|
}
|
|
|
|
location /static/drf-yasg {
|
|
proxy_pass http://127.0.0.1:__BACKEND_PORT__;
|
|
}
|
|
|
|
location /data {
|
|
internal;
|
|
alias /home/yunohost.app/__NAME__/data/;
|
|
}
|
|
|
|
# Original Photos
|
|
location /original {
|
|
internal;
|
|
alias /home/yunohost.app/__NAME__/data/;
|
|
}
|
|
# Nextcloud Original Photos
|
|
location /nextcloud_original {
|
|
internal;
|
|
alias /home/yunohost.app/__NAME__/data/nextcloud_media/;
|
|
}
|