nginx + ssl

user nobody ;
worker_processes  1;

events {
    worker_connections  1024;
}


http {
    include       mime.types;
    default_type  application/octet-stream;
    log_format    main  '$remote_addr - $remote_user [$time_local] "$request" ';
    access_log    /www/q88888888/log/access.log  main;
    sendfile      on;
    keepalive_timeout  65;
    gzip  on;
    client_max_body_size 20m;
    client_body_buffer_size 128k;



    server {
        listen       80;
        server_name  ******************.com;
        location / {
            root   '/www/******************.com/www';
            index  index.html index.php;
            try_files $uri $uri/ /index.php?$query_string;
        }
        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
        }

        location ~ \.php$ {
           root           html;
           fastcgi_pass   127.0.0.1:9000;
           fastcgi_index  index.php;
           fastcgi_param  SCRIPT_FILENAME  /www/******************.com/www$fastcgi_script_name;
           include        fastcgi_params;
        }

    }



    server {
      listen       80;                                              
      listen                443;                                                  
      server_name           www.******************.com;
      ssl                  on;
      ssl_certificate       /www/******************.com/ssl/******************.com-ca-bundle.crt;
      ssl_certificate_key      /www/******************.com/ssl/******************.com.key;     
      ssl_session_timeout  5m;
      ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
      ssl_ciphers AESGCM:ALL:!DH:!EXPORT:!RC4:+HIGH:!MEDIUM:!LOW:!aNULL:!eNULL;
      ssl_prefer_server_ciphers   on; 
      location /     {                                                 
            root   '/www/******************.com/www';
            index  index.html index.php;
            try_files $uri $uri/ /index.php?$query_string;
      }                                                                
      error_page   500 502 503 504  /50x.html;
      location = /50x.html {
            root   html;
      }

      location ~ \.php$ {
           root           html;
           fastcgi_pass   127.0.0.1:9000;
           fastcgi_index  index.php;
           fastcgi_param  SCRIPT_FILENAME  /www/******************.com/www$fastcgi_script_name;
           include        fastcgi_params;
      }                                                                    
    } 



    server {
        listen       80;
        listen       443;          
        server_name  ask.******************.com;
        ssl                  on;
        ssl_certificate       /www/ask.******************.com/ssl/ask.******************.com-ca-bundle.crt;
        ssl_certificate_key      /www/ask.******************.com/ssl/ask.******************.com.key;     
        ssl_session_timeout  5m;
        ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
        ssl_ciphers AESGCM:ALL:!DH:!EXPORT:!RC4:+HIGH:!MEDIUM:!LOW:!aNULL:!eNULL;
        ssl_prefer_server_ciphers   on; 
        location / {
            root   '/www/ask.******************.com/www';
            index  index.html index.php;
            try_files $uri $uri/ /index.php?$query_string;
        }
        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
        }

        location ~ \.php$ {
           root           html;
           fastcgi_pass   127.0.0.1:9000;
           fastcgi_index  index.php;
           fastcgi_param  SCRIPT_FILENAME  /www/ask.******************.com/www$fastcgi_script_name;
           include        fastcgi_params;
        }

    }



    server {
        listen       80;
        server_name  www.+++++.com +++++.com;
        location / {
            root   '/www/+++++.com';
            index  index.html;
        }
        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
        }
        location ~ \.php$ {
           root           html;
           fastcgi_pass   127.0.0.1:9000;
           fastcgi_index  index.php;
           fastcgi_param  SCRIPT_FILENAME  /www/+++++.com$fastcgi_script_name;
           include        fastcgi_params;
        }
    }


}

©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容