只需要把80端口情况rewrite到443即可!
server {
listen 80;
server_name oa.dalu.com;
rewrite ^(.*)$ https://${server_name}$1 permanent;
}
server {
listen 443;
#server_name default;
server_name oa.dalu.com;
root /data/web/;
……
只需要把80端口情况rewrite到443即可!
server {
listen 80;
server_name oa.dalu.com;
rewrite ^(.*)$ https://${server_name}$1 permanent;
}
server {
listen 443;
#server_name default;
server_name oa.dalu.com;
root /data/web/;
……