101 lines
2.0 KiB
Nginx Configuration File
101 lines
2.0 KiB
Nginx Configuration File
|
user {{ osp_edge_http_user }};
|
||
|
worker_processes auto;
|
||
|
|
||
|
# pid in nginx.service
|
||
|
# pid /run/nginx.pid;
|
||
|
|
||
|
events {
|
||
|
worker_connections 1024;
|
||
|
multi_accept on;
|
||
|
use epoll;
|
||
|
}
|
||
|
|
||
|
http {
|
||
|
types_hash_max_size 2048;
|
||
|
types_hash_bucket_size 128;
|
||
|
|
||
|
include mime.types;
|
||
|
default_type application/octet-stream;
|
||
|
|
||
|
proxy_cache_path /tmp/osp levels=1:2 keys_zone=auth_cache:5m max_size=1g inactive=24h;
|
||
|
|
||
|
sendfile on;
|
||
|
tcp_nopush on;
|
||
|
gzip on;
|
||
|
gzip_comp_level 5;
|
||
|
gzip_min_length 256;
|
||
|
gzip_proxied any;
|
||
|
gzip_vary on;
|
||
|
|
||
|
gzip_types
|
||
|
application/atom+xml
|
||
|
application/javascript
|
||
|
application/json
|
||
|
application/ld+json
|
||
|
application/manifest+json
|
||
|
application/rss+xml
|
||
|
application/vnd.geo+json
|
||
|
application/vnd.ms-fontobject
|
||
|
application/x-font-ttf
|
||
|
application/x-web-app-manifest+json
|
||
|
application/xhtml+xml
|
||
|
application/xml
|
||
|
font/opentype
|
||
|
image/bmp
|
||
|
image/svg+xml
|
||
|
image/x-icon
|
||
|
image/gif
|
||
|
image/png
|
||
|
video/mp4
|
||
|
video/mpeg
|
||
|
video/x-flv
|
||
|
text/cache-manifest
|
||
|
text/css
|
||
|
text/plain
|
||
|
text/vcard
|
||
|
text/vnd.rim.location.xloc
|
||
|
text/vtt
|
||
|
text/x-component
|
||
|
text/x-cross-domain-policy;
|
||
|
|
||
|
|
||
|
keepalive_timeout 65;
|
||
|
|
||
|
server {
|
||
|
listen 9000;
|
||
|
|
||
|
allow 127.0.0.1; # keep save there is one allowed
|
||
|
{% for h in osp_edge_allow %}
|
||
|
allow {{ h }};
|
||
|
{% endfor %}
|
||
|
deny all;
|
||
|
|
||
|
location /stat {
|
||
|
rtmp_stat all;
|
||
|
rtmp_stat_stylesheet stat.xsl;
|
||
|
}
|
||
|
|
||
|
location /stat.xsl {
|
||
|
root /opt/osp/static;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
server {
|
||
|
listen 80;
|
||
|
listen [::]:80;
|
||
|
|
||
|
# set client body size to 16M #
|
||
|
client_max_body_size 16M;
|
||
|
|
||
|
include osp-redirects.conf;
|
||
|
|
||
|
# redirect server error pages to the static page /50x.html
|
||
|
error_page 500 502 503 504 /50x.html;
|
||
|
location = /50x.html {
|
||
|
root html;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
include osp-rtmp.conf;
|