mirror of
https://github.com/caronc/apprise-api.git
synced 2024-12-12 18:00:51 +01:00
81 lines
1.7 KiB
Nginx Configuration File
81 lines
1.7 KiB
Nginx Configuration File
daemon off;
|
|
worker_processes auto;
|
|
pid /run/apprise/nginx.pid;
|
|
include /etc/nginx/modules-enabled/*.conf;
|
|
|
|
events {
|
|
worker_connections 768;
|
|
}
|
|
|
|
http {
|
|
##
|
|
# Basic Settings
|
|
##
|
|
sendfile on;
|
|
tcp_nopush on;
|
|
types_hash_max_size 2048;
|
|
include /etc/nginx/mime.types;
|
|
default_type application/octet-stream;
|
|
# Do not display Nginx Version
|
|
server_tokens off;
|
|
|
|
##
|
|
# Upload Restriction
|
|
##
|
|
client_max_body_size 500M;
|
|
|
|
##
|
|
# Logging Settings
|
|
##
|
|
access_log /dev/stdout;
|
|
error_log /dev/stdout info;
|
|
|
|
##
|
|
# Gzip Settings
|
|
##
|
|
gzip on;
|
|
|
|
##
|
|
# Host Configuration
|
|
##
|
|
client_body_buffer_size 256k;
|
|
client_body_in_file_only off;
|
|
|
|
server {
|
|
listen 8000;
|
|
listen [::]:8000;
|
|
|
|
# Allow users to map to this file and provide their own custom
|
|
# overrides such as
|
|
include /etc/nginx/server-override.conf;
|
|
|
|
# Main Website
|
|
location / {
|
|
include /etc/nginx/uwsgi_params;
|
|
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_pass http://localhost:8080;
|
|
# Give ample time for notifications to fire
|
|
proxy_read_timeout 120s;
|
|
include /etc/nginx/location-override.conf;
|
|
}
|
|
|
|
# Static Content
|
|
location /s/ {
|
|
root /usr/share/nginx/html;
|
|
index index.html;
|
|
include /etc/nginx/location-override.conf;
|
|
}
|
|
|
|
# 404 error handling
|
|
error_page 404 /404.html;
|
|
|
|
# redirect server error pages to the static page /50x.html
|
|
error_page 500 502 503 504 /50x.html;
|
|
location = /50x.html {
|
|
root /usr/share/nginx/html;
|
|
}
|
|
}
|
|
}
|