zoukankan      html  css  js  c++  java
  • nginx配置

    user  nginx; worker_processes  10; worker_rlimit_nofile 100000;

    error_log   /var/log/nginx/error.log; #error_log  /var/log/nginx/error.log  notice; #error_log  /var/log/nginx/error.log  info;

    pid        /var/run/nginx.pid;

    events {     worker_connections  1024;     use epoll; }

    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  /var/log/nginx/access.log  main;

        sendfile        on;     tcp_nopush      on;     tcp_nodelay     on;     server_tokens   on;     gzip            on;     gzip_static     on;     gzip_comp_level 5;     gzip_min_length 1024;     keepalive_timeout  65;     limit_conn_zone   $binary_remote_addr  zone=addr:10m;

        # Load config files from the /etc/nginx/conf.d directory    # include /etc/nginx/conf.d/*.conf;

        server {         limit_conn addr 10;         listen       80;         server_name  _;

            #charset koi8-r;

            #access_log  logs/host.access.log  main;

                root   /var/www/html;             index  index.html index.htm;             autoindex on;

            # 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;     #    server_name  localhost;

        #    ssl                  on;     #    ssl_certificate      cert.pem;     #    ssl_certificate_key  cert.key;

        #    ssl_session_timeout  5m;

        #    ssl_protocols  SSLv2 SSLv3 TLSv1;     #    ssl_ciphers  HIGH:!aNULL:!MD5;     #    ssl_prefer_server_ciphers   on;

        #    location / {     #        root   html;     #        index  index.html index.htm;     #    }     #}

    }

  • 相关阅读:
    基准测试工具 pgbench 之一初步测试
    postgresql 9.1 kernel.shm 设置不当导致 FATAL: could not create shared memory segment
    centos 6.8 + postgresql 9.6 + make
    plpgsql 执行块
    postgresql 10.1 分区表之 list 分区
    debian 各个版本的代号
    debian 8.2 bond 双网卡
    centos 6.8 + postgresql 9.6 + adminpack
    centos 6.8 + postgresql 9.6 + pldebugger/pldbgapi
    postgresql 10.1 参数的初步了解 Preset Options
  • 原文地址:https://www.cnblogs.com/lubing666666/p/3910230.html
Copyright © 2011-2022 走看看