windows下搭建基于nginx的rtmp服务器
Windows7旗舰版 64位
Intel(R) Core(TM)i5-2520 CPU @2.50GHz 2.50 GHz
内存: 4GB
1. 下载 nginx 1.7.11.3 Gryphon
下载链接: http://nginx-win.ecsds.eu/download/nginx 1.7.11.3 Gryphon.zip
下载完成后解压;
将解压后的目录名:
nginx 1.7.11.3 Gryphon
改成:
nginx-1.7.11.3-Gryphon
2. 下载服务器状态检查程序 stat.xsl
https://github.com/arut/nginx-rtmp-module/
将nginx-rtmp-module-master.zip解压后复制到目录:nginx-1.7.11.3-Gryphon下,
保证stat.xls的目录为:
nginx-1.7.11.3-Gryphon\nginx-rtmp-module\stat.xsl
3. 配置文件 conf\nginx-win-rtmp.conf 内容如下:
#user nobody;
# multiple workers works !
worker_processes 2;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
events {
worker_connections 8192;
# max value 32768, nginx recycling connections+registry optimization =
# this.value * 20 = max concurrent connections currently tested with one worker
# C1000K should be possible depending there is enough ram/cpu power
# multi_accept on;
}
rtmp {
server {
listen 1935;
chunk_size 4000;
application live {
live on;
}
}
}
http {
#include /nginx/conf/naxsi_core.rules;
include mime.types;
default_type application/octet-stream;
#log_format main ’remoteaddr:remoteaddr:remote_addr:remote_port - remoteuser[remoteuser[remote_user [time_local] “request" '</span><br style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"><span style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"> # 'request" '</span><br style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"><span style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"> # 'request" '
# 'status bodybytessent"bodybytessent"body_bytes_sent "http_referer” ‘
# ’”httpuseragent""httpuseragent""http_user_agent" "http_x_forwarded_for”’;
#access_log logs/access.log main;
# # loadbalancing PHP
# upstream myLoadBalancer {
# server 127.0.0.1:9001 weight=1 fail_timeout=5;
# server 127.0.0.1:9002 weight=1 fail_timeout=5;
# server 127.0.0.1:9003 weight=1 fail_timeout=5;
# server 127.0.0.1:9004 weight=1 fail_timeout=5;
# server 127.0.0.1:9005 weight=1 fail_timeout=5;
# server 127.0.0.1:9006 weight=1 fail_timeout=5;
# server 127.0.0.1:9007 weight=1 fail_timeout=5;
# server 127.0.0.1:9008 weight=1 fail_timeout=5;
# server 127.0.0.1:9009 weight=1 fail_timeout=5;
# server 127.0.0.1:9010 weight=1 fail_timeout=5;
# least_conn;
# }
sendfile off;
#tcp_nopush on;
server_names_hash_bucket_size 128;
## Start: Timeouts ##
client_body_timeout 10;
client_header_timeout 10;
keepalive_timeout 30;
send_timeout 10;
keepalive_requests 10;
## End: Timeouts ##
#gzip on;
server {
listen 80;
server_name localhost;
location /stat {
rtmp_stat all;
rtmp_stat_stylesheet stat.xsl;
}
location /stat.xsl {
root nginx-rtmp-module/;
}
location /control {
rtmp_control all;
}
#charset koi8-r;
#access_log logs/host.access.log main;
## Caching Static Files, put before first location
#location ~* \.(jpg|jpeg|png|gif|ico|css|js){</span><br style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"><span style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"> # expires 14d;</span><br style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"><span style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"> # add_header Vary Accept-Encoding;</span><br style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"><span style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"> #}</span><br style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"><br style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"><span style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"># For Naxsi remove the single # line for learn mode, or the ## lines for full WAF mode</span><br style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"><span style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"> location / {</span><br style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"><span style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"> #include /nginx/conf/mysite.rules; # see also http block naxsi include line</span><br style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"><span style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"> ##SecRulesEnabled;</span><br style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"><span style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"> ##DeniedUrl "/RequestDenied";</span><br style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"><span style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"> ##CheckRule "$SQL >= 8" BLOCK;</span><br style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"><span style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"> ##CheckRule "$RFI >= 8" BLOCK;</span><br style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"><span style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"> ##CheckRule "$TRAVERSAL >= 4" BLOCK;</span><br style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"><span style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"> ##CheckRule "$XSS >= 8" BLOCK;</span><br style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"><span style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"> root html;</span><br style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"><span style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"> index index.html index.htm;</span><br style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"><span style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"> }</span><br style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"><br style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"><span style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"># For Naxsi remove the ## lines for full WAF mode, redirect location block used by naxsi</span><br style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"><span style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"> ##location /RequestDenied {</span><br style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"><span style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"> ## return 412;</span><br style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"><span style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"> ##}</span><br style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"><br style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"><span style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;">## Lua examples !</span><br style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"><span style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"># location /robots.txt {</span><br style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"><span style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"># rewrite_by_lua '</span><br style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"><span style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"># if ngx.var.http_host ~= "localhost" then</span><br style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"><span style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"># return ngx.exec("/robots_disallow.txt");</span><br style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"><span style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"># end</span><br style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"><span style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"># ';</span><br style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"><span style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"># }</span><br style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"><br style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"><span style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"> #error_page 404 /404.html;</span><br style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"><br style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"><span style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"> # redirect server error pages to the static page /50x.html</span><br style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"><span style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"> #</span><br style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"><span style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"> error_page 500 502 503 504 /50x.html;</span><br style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"><span style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"> location = /50x.html {</span><br style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"><span style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"> root html;</span><br style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"><span style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"> }</span><br style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"><br style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"><span style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"> # proxy the PHP scripts to Apache listening on 127.0.0.1:80</span><br style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"><span style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"> #</span><br style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"><span style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"> #location ~ \.php{</span><br style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"><span style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"> # expires 14d;</span><br style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"><span style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"> # add_header Vary Accept-Encoding;</span><br style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"><span style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"> #}</span><br style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"><br style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"><span style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"># For Naxsi remove the single # line for learn mode, or the ## lines for full WAF mode</span><br style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"><span style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"> location / {</span><br style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"><span style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"> #include /nginx/conf/mysite.rules; # see also http block naxsi include line</span><br style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"><span style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"> ##SecRulesEnabled;</span><br style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"><span style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"> ##DeniedUrl "/RequestDenied";</span><br style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"><span style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"> ##CheckRule "$SQL >= 8" BLOCK;</span><br style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"><span style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"> ##CheckRule "$RFI >= 8" BLOCK;</span><br style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"><span style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"> ##CheckRule "$TRAVERSAL >= 4" BLOCK;</span><br style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"><span style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"> ##CheckRule "$XSS >= 8" BLOCK;</span><br style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"><span style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"> root html;</span><br style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"><span style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"> index index.html index.htm;</span><br style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"><span style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"> }</span><br style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"><br style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"><span style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"># For Naxsi remove the ## lines for full WAF mode, redirect location block used by naxsi</span><br style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"><span style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"> ##location /RequestDenied {</span><br style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"><span style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"> ## return 412;</span><br style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"><span style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"> ##}</span><br style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"><br style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"><span style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;">## Lua examples !</span><br style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"><span style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"># location /robots.txt {</span><br style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"><span style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"># rewrite_by_lua '</span><br style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"><span style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"># if ngx.var.http_host ~= "localhost" then</span><br style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"><span style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"># return ngx.exec("/robots_disallow.txt");</span><br style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"><span style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"># end</span><br style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"><span style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"># ';</span><br style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"><span style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"># }</span><br style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"><br style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"><span style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"> #error_page 404 /404.html;</span><br style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"><br style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"><span style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"> # redirect server error pages to the static page /50x.html</span><br style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"><span style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"> #</span><br style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"><span style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"> error_page 500 502 503 504 /50x.html;</span><br style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"><span style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"> location = /50x.html {</span><br style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"><span style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"> root html;</span><br style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"><span style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"> }</span><br style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"><br style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"><span style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"> # proxy the PHP scripts to Apache listening on 127.0.0.1:80</span><br style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"><span style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"> #</span><br style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"><span style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"> #location ~ \.php {
# expires 14d;
# add_header Vary Accept-Encoding;
#}
# For Naxsi remove the single # line for learn mode, or the ## lines for full WAF mode
location / {
#include /nginx/conf/mysite.rules; # see also http block naxsi include line
##SecRulesEnabled;
##DeniedUrl "/RequestDenied";
##CheckRule "$SQL >= 8" BLOCK;
##CheckRule "$RFI >= 8" BLOCK;
##CheckRule "$TRAVERSAL >= 4" BLOCK;
##CheckRule "$XSS >= 8" BLOCK;
root html;
index index.html index.htm;
}
# For Naxsi remove the ## lines for full WAF mode, redirect location block used by naxsi
##location /RequestDenied {
## return 412;
##}
## Lua examples !
# location /robots.txt {
# rewrite_by_lua '
# if ngx.var.http_host ~= "localhost" then
# return ngx.exec("/robots_disallow.txt");
# end
# ';
# }
#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 html;
}
# proxy the PHP scripts to Apache listening on 127.0.0.1:80
#
#location ~ \.php {
# proxy_pass http://127.0.0.1;
#}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
#location ~ \.php{</span><br style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"><span style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"> # root html;</span><br style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"><span style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"> # fastcgi_pass 127.0.0.1:9000; # single backend process</span><br style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"><span style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"> # fastcgi_pass myLoadBalancer; # or multiple, see example above</span><br style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"><span style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"> # fastcgi_index index.php;</span><br style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"><span style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"> # fastcgi_param SCRIPT_FILENAME {</span><br style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"><span style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"> # root html;</span><br style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"><span style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"> # fastcgi_pass 127.0.0.1:9000; # single backend process</span><br style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"><span style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"> # fastcgi_pass myLoadBalancer; # or multiple, see example above</span><br style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"><span style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"> # fastcgi_index index.php;</span><br style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"><span style="color:rgb(102,102,102);font-family:'宋体', Arial;font-size:16px;line-height:26px;"> # fastcgi_param SCRIPT_FILENAME {
# root html;
# fastcgi_pass 127.0.0.1:9000; # single backend process
# fastcgi_pass myLoadBalancer; # or multiple, see example above
# fastcgi_index index.php;
# fastcgi_param SCRIPT_FILENAME document_root$fastcgi_script_name;
# include fastcgi_params;
#}
# deny access to .htaccess files, if Apache’s document root
# concurs with nginx’s one
#
#location ~ /\.ht {
# deny all;
#}
}
# another virtual host using mix of IP-, name-, and port-based configuration
#
#server {
# listen 8000;
# listen somename:8080;
# server_name somename alias another.alias;
# location / {
# root html;
# index index.html index.htm;
# }
#}
# HTTPS server
#
#server {
# listen 443 ssl spdy;
# server_name localhost;
# ssl on;
# ssl_certificate cert.pem;
# ssl_certificate_key cert.key;
# ssl_session_timeout 5m;
# ssl_prefer_server_ciphers On;
# ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
# ssl_ciphers ECDH+AESGCM:ECDH+AES256:ECDH+AES128:ECDH+3DES:RSA+AESGCM:RSA+AES:RSA+3DES:!aNULL:!eNULL:!MD5:!DSS:!EXP:!ADH:!LOW:!MEDIUM;
# location / {
# root html;
# index index.html index.htm;
# }
#}
}
4. 启动服务器
进入windows的cmd;
> cd nginx-1.7.11.3-Gryphon
> nginx.exe -c conf\nginx-win-rtmp.conf
windows下搭建基于nginx的rtmp服务器相关推荐
- 在windows平台搭建基于nginx的直播服务器
1.nginx简介 Nginx本身是一个非常出色的HTTP服务器,FFMPEG是非常好的音视频解决方案.这两个东西通过一个nginx的模块nginx-rtmp-module,组合在一起即可以搭建一个功 ...
- win7连接sftp_Windows 7下 搭建 基于 ssh 的sftp 服务器
Windows xp 下 搭建 基于ssh 的sftp 服务器,服务器端可以用freesshd,F-secure server等,filezilla server不可用,之前傻乎乎的用filezil ...
- [原创]在windows下搭建基于apache的SVN环境
[原创]在windows下搭建基于apache的SVN环境 1 软件下载: 在http://httpd.apache.org/download.cgi,下载: apache_2.2.14-win32- ...
- Windows下搭建局域网内简易git服务器
这里写自定义目录标题 概述 配置步骤 1.任意位置创建git 仓库 2.启动Git Daemon 3.其他电脑克隆工程 4.开机自动启动 5.其他配置 注意事项 概述 由于和朋友小规模制作项目,又使用 ...
- windows下编译基于nginx插件的rtmp流媒体服务nginx-rtmp
修改去掉一下makefile里面的-WX选项,该选项会在编译的时候把警告当作错误.https://blog.csdn.net/zqw_4181/article/details/93196839 htt ...
- windows下ffmpeg结合Nginx搭建RTMP,直播中的推流和拉流
windows下ffmpeg结合Nginx搭建RTMP,直播中的推流和拉流 推流和拉流的概念 以及RTMP协议 在直播中,一般需要三个角色:主播,服务器,用户.主播通过推流将数据推到服务器上,而用户可 ...
- 【音视频】RTMP:windows下搭建rtmp服务器(未完结...)
0.RTMP服务器简介 0.1 Nginx-RTMP 使用Nginx和Nginx的RTMP模块(nginx-rtmp-module)搭建RTMP流媒体服务器. Nginx 是一款轻量级的 Web 服务 ...
- FFmpeg入门详解之99:基于nginx的rtmp直播服务器(nginx-rtmp-module实现)
基于nginx的rtmp直播服务器(nginx-rtmp-module实现) 首先,在搭建服务之前先了解下目前主流的几个直播协议: 1.RTMP: 实时消息传输协议,Real Time Messagi ...
- MQTT在Windows下搭建MQTT服务器
MQTT 在Windows下搭建MQTT服务器 版权声明:本文为博主原创文章,未经博主允许不得转载. https://blog.csdn.net/u012163234/article/details/ ...
最新文章
- python图像相似度识别_一个用SIFT特征比较图像相似度的python小程序
- SCCM2012系列之三,SCCM2012部署前的IIS准备
- Nginx初学第一步
- [Spark]PySpark入门学习教程---例子RDD与DataFrame
- android监听器作用,android - 监听器和接收器(Android)有什么区别?
- oracle fnd file.log,OracleEBSWIP模块DebugLog收集方法
- mysql数据库主主_MySQL主主复制(图文详解)
- ArcGIS Maritime Server 开发教程(七)Maritime Server 正确的开发模式
- FIND、FINDINDEX、INDEXOF、LASTINDEX、INCLUDES 数组五种查询条件方法介绍
- server2019安装mysql_windows server2019下安装mysql8.0.11
- 卫星通信系统按照工作轨道分类
- 机器学习(十七):网格搜索(Grid Search)和SVM
- MongoVue 破解治标不治本
- Google技巧:crack web sites
- SolidWorks工程图比例 1:1 配置
- opencv实现摄像头的实时人脸识别
- ubuntu20.04 NVIDIA显卡驱动安装教程(Y9000p)
- windows系统维护工具箱
- 技术原理丨超高精准度IP地址定位这样实现
- 紫书习题3-6纵横字谜的游戏
热门文章
- 通用大数据架构为什么不适合处理物联网数据?
- 容器编排技术 -- Kubernetes 给容器和Pod分配CPU资源
- localstorage本地缓存
- 不要再写这样的神级代码了!
- C# .NET 使用 NPOI 生成 .xlsx 格式 Excel
- 【python】Macbook M1/M1pro/M1max 安装anaconda记录
- 【HTML】输入密码访问
- [ACTF2020 新生赛]Include
- 可访问性不一致 可访问性低_什么是网站可访问性?
- springmvc php,SpringMVC 常用注解