nginx 配置https访问

server {
 listen 443;
 server_name ssl.17byh.com;
 ssl on;
 ssl_certificate sslkey/1_ssl.17byh.com_bundle.crt;
 ssl_certificate_key sslkey/2_ssl.17byh.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_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
ssl_prefer_server_ciphers on;

    access_log /data/wwwlogs/access_Nginx_ssl.17byh.com.log combined;
    root /mnt/www/plist_www;
    index index.html index.htm index.PHP;

    include rewrite/thinkPHP.conf;

    location /Nginx_status {
      stub_status on;
      access_log off;
      allow 127.0.0.1;
      deny all;
    }

    location ~ index\.PHP(/|$) {
      #fastcgi_pass remote_PHP_ip:9000;
      fastcgi_pass unix:/dev/shm/php-cgi.sock;
      fastcgi_index index.PHP;
            fastcgi_split_path_info  ^(.+index\.PHP)(/.*)$;
      fastcgi_param  PATH_INFO $fastcgi_path_info;
      include fastcgi.conf;
    }
    location ~ admin\.PHP(/|$) {
      #fastcgi_pass remote_PHP_ip:9000;
      fastcgi_pass unix:/dev/shm/php-cgi.sock;
      fastcgi_index admin.PHP;
      fastcgi_split_path_info  ^(.+admin\.PHP)(/.*)$;
      fastcgi_param  PATH_INFO $fastcgi_path_info;
      try_files $uri $uri/ /admin.PHP?s=$fastcgi_path_info;
      include fastcgi.conf;
    }
    location ~ [^/]\.PHP(/|$) {
        #default_type    text/plain;
        #return 502 "服务正在升级,请稍后再试……";
        deny all;
	#allow all;
    }

    location ~ .*\.(gif|jpg|jpeg|png|bmp|swf|flv|mp4|ico)$ {
        expires 30d;
        access_log off;
    }

    location ~ .*\.(js|css)?$ {
        expires 7d;
        access_log off;
    }

    location ~ /\.ht {
        deny all;
    }
 }

 

相关文章

Nginx (engine x) 是一个高性能的HTTP和反向代理服务,也是一...
本地项目配置 1 复制 luffy/settings/dev.py为prop.py 修改l...
nginx不仅可以隐藏版本信息,还支持自定义web服务器信息 先看...
一 、此次漏洞分析 1 nginx HTTP/2漏洞 [nginx-announce] ng...
###进入nginx 目录cd /usr/local/nginx###递归显示 2 级目录...
在cmd命令窗口输入下面命令进行查看 tasklist /fi "ima...