zoukankan      html  css  js  c++  java
  • 我的Nginx配置文件

    #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 ingwill.com{
        	server 127.0.0.1:8080;
    	server 127.0.0.1:8081;
        }
    
        server {
            listen       80;
            server_name  localhost;
    
            #charset koi8-r;
    
            #access_log  logs/host.access.log  main;
    
             location / {
                proxy_pass http://ingwill.com;
             proxy_redirect default;
            }
    
    	
    
            #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;
            server_name www.ingwill.com; #填写绑定证书的域名
            ssl on;
            ssl_certificate 1_www.ingwill.com_bundle.crt;
            ssl_certificate_key 2_www.ingwill.com.key;
            ssl_session_timeout 5m;
            ssl_protocols TLSv1 TLSv1.1 TLSv1.2; #按照这个协议配置
            ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE;#按照这个套件配置
            ssl_prefer_server_ciphers on;
            location / {
                proxy_pass http://ingwill.com;
    	    proxy_redirect default;
        proxy_connect_timeout 1;  
        proxy_read_timeout 1;  
        proxy_send_timeout 1;  
            }
    
        }
    }
    

      

  • 相关阅读:
    Ubuntu 12.10 安装破解sublimetext 2
    封装一个类型转换的方法
    【转】CultureInfo中重要的InvariantCulture
    C# 36进制转10进制
    用泛型的IEqualityComparer<T>接口去重复项
    关于wamp启动是80端口被占用的问题详解(win7系统下WAMP 80端口被MicrosoftHTTPAPI/2.0占用的解决办法)
    Ubuntu 更改鼠标滚轮速度
    edge ctrl+c 复制不起作用
    centos 7 mysql8 安装和卸载
    Windows Terminal 终端 SSH连接centos7 linux
  • 原文地址:https://www.cnblogs.com/netcorner/p/7209732.html
Copyright © 2011-2022 走看看