按照您的nginx 的配置
来源:12-3 .部署微电影网站
zsj01
2017-10-30
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;
}
}
1回答
-
浅若丶清风
2017-10-30
需要根据你Linux系统的cpu核数进行修改,例如:系统为1核的话修改为1 worker_processes 1;对应的运行端口改为一个即可 upstream movie { server 127.0.0.1:5000; }
00
相似问题