zoukankan      html  css  js  c++  java
  • nginx conf配置备份


    user nginx;
    worker_processes 2;

    error_log /var/log/nginx/error.log warn;
    pid /var/run/nginx.pid;


    events {
    worker_connections 1024;
    }


    http {
    include /etc/nginx/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 off;

    sendfile on;
    #tcp_nopush on;

    keepalive_timeout 65;

    #gzip on;
    upstream mysvr_login {

    server 127.0.0.1:2018;
    server 127.0.0.1:2019;
    server 127.0.0.1:2020;
    server 127.0.0.1:2021;
    }
    server {
    listen 2016;
    server_name loginserver;

    location / {
    proxy_pass http://mysvr_login;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    }
    }
    upstream mysvr_world {
    server 127.0.0.1:2025;

    }
    server {
    listen 2017;
    server_name worldserver;


    location / {
    proxy_pass http://mysvr_world;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    }
    }
    upstream mysvr_chat {
    server 127.0.0.1:2035;

    }
    server {
    listen 2014;
    server_name chatserver;


    location / {
    proxy_pass http://mysvr_chat;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    }
    }
    }

  • 相关阅读:
    入门学习
    SQL语句
    Jmeter录制badboy
    post方式提交数据
    get向服务器提交数据
    手机端解析json
    生成JSON字符串
    新闻客户端
    从网络下载的图片加缓存功能
    消息队列机制messageQuene
  • 原文地址:https://www.cnblogs.com/shuangxinye/p/6296623.html
Copyright © 2011-2022 走看看