标签:filename span sts adf default ssl sla nginx配置 ken
1.申请证书,可到 https://www.sslforfree.com/ 申请免费证书,有效期3个月。
2.下载证书文件到服务器.
3.配置Nginx的vhosts.conf文件,以www.abc.net为例。
server { listen 443 ssl; server_name www.abc.net alias ; ssl_certificate E:/UPUPW/cert/certificate.crt; ssl_certificate_key E:/UPUPW/cert/private.key; ssl_session_cache shared:SSL:1m; ssl_session_timeout 5m; ssl_ciphers HIGH:!aNULL:!MD5; ssl_prefer_server_ciphers on; location / { root E:/www/www.abc.net; index index.html index.htm default.html default.htm index.php default.php app.php u.php; include E:/www/www.abc.net/up-*.conf; if (!-e $request_filename) { rewrite ^(.*)$ /index.php?s=/$1 last; break; } } autoindex off; include advanced_settings.conf; #include expires.conf; location ~* .*\/(attachment|attachments|uploadfiles|avatar)\/.*\.(php|php5|phps|asp|aspx|jsp)$ { deny all; } location ~ ^.+\.php { root E:/www/www.abc.net; fastcgi_pass bakend; fastcgi_index index.php; fastcgi_split_path_info ^((?U).+\.php)(/?.+)$; fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info; include fastcgi.conf; } }
标签:filename span sts adf default ssl sla nginx配置 ken
原文地址:http://www.cnblogs.com/ucdn/p/6897851.html