老师,nginx反向代理好像没讲,说是下节分析结果好像没有
来源:12-3 .部署微电影网站

Stormdige
2017-08-21
问题补充(选填):请详细描述你的问题,贴出相关代码或截图,并告知你的操作步骤
写回答
1回答
-
rustgopy
2017-08-21
worker_processes 4; events { worker_connections 262140; } http { include mime.types; default_type application/octet-stream; sendfile on; keepalive_timeout 65; limit_conn_zone $binary_remote_addr zone=addr:5m; upstream movie { server 127.0.0.1:5001; server 127.0.0.1:5002; server 127.0.0.1:5003; server 127.0.0.1:5004; } server { listen 80; server_name localhost; location / { root html; index index.html index.htm; proxy_pass http://movie; } location ~ \.flv$ { flv; limit_conn addr 4; limit_rate 1024k; rewrite ^/static/uploads/(.+?).flv$ /movie_project/app/static/uploads/$1.flv permanent; } location ~ \.mp4$ { mp4; limit_conn addr 4; limit_rate 1024k; rewrite ^/static/uploads/(.+?).mp4$ /movie_project/app/static/uploads/$1.mp4 permanent; } error_page 500 502 503 504 /50x.html; location = /50x.html { root html; } } }
同学你好,在11-3有讲解,你参考下nginx.conf文件,worker_processes根据CPU核心数修改一下!
10
相似问题