nginx
server 配制
server {
listen 80;
server_name localhost;
# charset koi8-r;
# access_log logs/host.access.log main;
location / {  # 每个location 相当 于一个url
# 包含uwsgi的请求参数
include uwsgi_params;
# 转交请求给uwsgi
uwsgi_pass 127.0.0.1:8000
}
location /static {
    # 指定静态文件存放的目录
    alias /xxx/xxx/static/;
}
#location / {
    # nginx 转发请求给另外地址
   # proxy_pass http://172.16.179.131:80}
}
nginx 负载均衡实现
upstream xxx {  # xxx 是自己启的名字
server 127.0.0.1:8000;
server 127.0.0.1:80801
}
server {
...
...
location / {
# 包含uwsgi的请求参数
include uwsgi_params;
# 转交请求给uwsgi
uwsgi_pass xxx  # upstream 中 自己启的名字
}
}
相关推荐
  lreis00    2020-06-29  
   89403969    2020-06-12  
   ZhaoMengjiao    2020-06-09  
   87193750    2020-05-30  
   咻咻ing    2020-05-17  
   eightbrother    2020-05-05  
   87254055    2020-04-14  
   ZhaoMengjiao    2020-03-28  
   ZhaoMengjiao    2020-03-08  
   89403969    2020-03-04  
   89403969    2020-03-04  
   87193750    2020-02-24  
   85407718    2020-02-09  
   eightbrother    2020-01-02  
   vanturman    2019-12-26  
   山顶冻人    2019-12-25  
   aolishuai    2019-12-13  
   89403969    2019-12-11  
   87193750    2019-12-09  
 