paperless - add nginx sample proxy configuration
This commit is contained in:
@@ -237,6 +237,41 @@ step_100() {
|
||||
* /etc/ImageMagick-x/policy.xml
|
||||
* enable access to pdfs
|
||||
<policy domain="coder" rights="read|write" pattern="PDF" />
|
||||
|
||||
# Nginx proxy
|
||||
|
||||
---
|
||||
server {
|
||||
listen 443 ssl http2;
|
||||
listen [::]:443 ssl http2;
|
||||
server_name mydomain.com;
|
||||
|
||||
access_log off; #/var/log/nginx/paperless.log;
|
||||
error_log /var/log/nginx/paperless_error.log;
|
||||
|
||||
include /etc/nginx/ssl.conf;
|
||||
error_page 497 https://\$host:\$server_port\$request_uri;
|
||||
|
||||
fastcgi_read_timeout 300s;
|
||||
proxy_read_timeout 65s;
|
||||
client_max_body_size 20M;
|
||||
|
||||
location / {
|
||||
proxy_pass http://10.0.0.10/;
|
||||
|
||||
# These configuration options are required for WebSockets to work.
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade \$http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
|
||||
proxy_redirect off;
|
||||
proxy_set_header Host \$http_host;
|
||||
proxy_set_header X-Real-IP \$remote_addr;
|
||||
proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto \$scheme;
|
||||
}
|
||||
}
|
||||
---
|
||||
EOF_NOTES
|
||||
color none
|
||||
}
|
||||
|
Reference in New Issue
Block a user