server {
listen 80;
listen 443 ssl; #监听端口,要让https和http并存,不能在配置文件中使用ssl on
server_name 192.168.1.193;
root C:\webapps\bsxmgw\pages;
index index.html index.htm;
#ssl on; 这里要注释掉
ssl_certificate C:/webapps/identifykey.cer;
ssl_certificate_key C:/webapps/identifykey.key;
#以下配置可以忽略
location ~ ^/(p_w_picpaths|javascript|js|css|flash|media|static)/ {
root C:\webapps\bsxmgw;
access_log off;
expires 30d;
}
}
转载于:https://blog.51cto.com/fengzhiran/1936618