Create a gist now

Instantly share code, notes, and snippets.

@Jack0r /nginx.conf
Last active Oct 8, 2016

Nginx, simple secure server, http and rtmp only local network
worker_processes 1;
error_log logs/rtmp_error.log debug;
pid logs/nginx.pid;
events {
worker_connections 1024;
}
http {
allow 192.168.0.0/24;
deny all;
access_log logs/rtmp_access.log;
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
server {
listen 80;
server_name localhost;
# rtmp stat
location /stat {
rtmp_stat all;
rtmp_stat_stylesheet stat.xsl;
}
location /stat.xsl {
# you can move stat.xsl to a different location
root html;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
}
rtmp {
server {
listen 1935;
chunk_size 8192;
application live {
allow publish 192.168.0.0/24;
deny publish all;
allow play 192.168.0.0/24;
deny play all;
live on;
meta copy;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment