forked from LibrePhotos/librephotos-linux
-
Notifications
You must be signed in to change notification settings - Fork 0
/
nginx.conf
43 lines (43 loc) · 1.15 KB
/
nginx.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
user www-data;
worker_processes 1;
error_log /var/log/nginx/error.log debug;
events {
worker_connections 1024;
}
http {
server {
listen 80;
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:3000/;
}
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:8001;
}
# Django media
location /protected_media {
internal;
alias /var/lib/librephotos/protected_media/;
}
# Original Photos
location /original {
internal;
alias /var/lib/librephotos/data/;
}
# Nextcloud Original Photos
location /nextcloud_original {
internal;
alias /var/lib/librephotos/data/nextcloud_media/;
}
}
}