博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
nginx 负载配置
阅读量:4947 次
发布时间:2019-06-11

本文共 2722 字,大约阅读时间需要 9 分钟。

#user  nobody;worker_processes  1;#error_log  logs/error.log;#error_log  logs/error.log  notice;#error_log  logs/error.log  info;#pid        logs/nginx.pid;events {    worker_connections  1024;}http {    include       mime.types;    default_type  application/octet-stream;    #log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '    #                  '$status $body_bytes_sent "$http_referer" '    #                  '"$http_user_agent" "$http_x_forwarded_for"';    #access_log  logs/access.log  main;    sendfile        on;    #tcp_nopush     on;    #keepalive_timeout  0;    keepalive_timeout  65;    #gzip  on;    upstream bbing{    ip_hash;    server 39.7.99.73:8020;    server 47.4.12.38:8010;    }    server {        listen       8015;        server_name  39.7.99.73;        #charset koi8-r;        #access_log  logs/host.access.log  main;        location / {        proxy_pass http://bbing;            root   html;            index  index.html index.htm;        }         #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$ {        #    root           html;        #    fastcgi_pass   127.0.0.1:9000;        #    fastcgi_index  index.php;        #    fastcgi_param  SCRIPT_FILENAME  /scripts$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;    #    server_name  localhost;    #    ssl_certificate      cert.pem;    #    ssl_certificate_key  cert.key;    #    ssl_session_cache    shared:SSL:1m;    #    ssl_session_timeout  5m;    #    ssl_ciphers  HIGH:!aNULL:!MD5;    #    ssl_prefer_server_ciphers  on;    #    location / {    #        root   html;    #        index  index.html index.htm;    #    }    #}}

 

转载于:https://www.cnblogs.com/chenyishi/p/9238999.html

你可能感兴趣的文章
性能测试插件
查看>>
全站缓存时代
查看>>
http://javafound.iteye.com/blog/704141 微博是这样练成的
查看>>
[MPI学习笔记]mpi并行实现方法
查看>>
c++ builder 获取命令行参数
查看>>
Win7系统重启后ip丢失问题问题的解决方法
查看>>
等保2.0所需设备
查看>>
jquery easyui-linkButton获取和设置按钮text并且解决火狐不支持innerText的方法
查看>>
IBM大型主机(Mainframe)技术简介之六——数据库和系统集成(二)
查看>>
【BZOJ5336】[TJOI2018]party(动态规划)
查看>>
【BZOJ4944】[NOI2017]泳池(线性常系数齐次递推,动态规划)
查看>>
我只为一瓶啤酒
查看>>
timestamp与timedelta,管理信息系统概念与基础
查看>>
linux 服务器时间同步
查看>>
蓝桥杯 历届试题 幸运数
查看>>
SQL游标(cursor)详细说明及内部循环使用示例
查看>>
[转]【HTTP】Fiddler(二) - 使用Fiddler做抓包分析
查看>>
[转]C#使用 Salt + Hash 来为密码加密
查看>>
Tornado入门
查看>>
9. 回文数
查看>>