Created
February 20, 2017 18:49
-
-
Save gcaraciolo/881584852e0cdff9e9be538613781c5a to your computer and use it in GitHub Desktop.
Nginx, simple secure server, http and rtmp only local network
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
acho q usamos isso para o instagram live