zoukankan      html  css  js  c++  java
  • nginx *mysql

    必须是nginx 1.9以上版本

    ./configure --prefix=/export/servers/nginx --sbin-path=/export/servers/nginx/sbin/nginx --conf-path=/export/servers/nginx/conf/nginx.conf --error-log-path=/export/servers/nginx/logs/error.log --http-log-path=/export/servers/nginx/logs/access.log --pid-path=/export/servers/nginx/var/nginx.pid --lock-path=/export/servers/nginx/var/nginx.lock --http-client-body-temp-path=/dev/shm/nginx_temp/client_body --http-proxy-temp-path=/dev/shm/nginx_temp/proxy --http-fastcgi-temp-path=/dev/shm/nginx_temp/fastcgi --user=admin --group=admin --with-cpu-opt=pentium4F --without-select_module --without-poll_module --with-http_realip_module --with-http_sub_module --with-http_gzip_static_module --with-http_stub_status_module --without-http_ssi_module --without-http_userid_module --without-http_ssi_module --without-http_userid_module --without-http_geo_module --without-http_map_module --without-mail_pop3_module --without-mail_imap_module --without-mail_smtp_module --without-http_proxy_module --with-stream

    make && make install 

    user  admin;
    #user root;
    worker_processes  8;
    error_log  /export/Logs/servers/nginx/logs/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  /export/Logs/servers/nginx/logs/access.log  main;
        sendfile        on;
        #tcp_nopush     on;
        keepalive_timeout  65;
        #gzip  on;
        include /etc/nginx/conf.d/*.conf;
    }
    stream{
            upstream mysql{
                   server 192.168.115.125:3358 weight=1;
                   
            }
            
            server{
                   listen 3358;
                   proxy_pass mysql;
            }
    }

    ------------------------------------------------------Tanwheey-------------------------------------------------------------------------

    爱生活,爱工作。

  • 相关阅读:
    SQL server 分页方法小结
    在电脑上测试手机网站全攻略
    android批量插入数据效率对比
    表格细边框的两种CSS实现方法
    作为一个非纯粹的优质码农,应该有怎么样的心态?
    C#注册表读写完整操作类
    SQL Server默认1433端口修改方法
    学习编程一年多的体会
    mac上virtualbox创建vm需要注意启动顺序
    git diff patch方法
  • 原文地址:https://www.cnblogs.com/Tanwheey/p/12177063.html
Copyright © 2011-2022 走看看