server {
listen 80;
server_name bbs.riceyoung.com;
# rewrite ^(.*)$ https://bbs.riceyoung.com$1 permanent;
# rewrite ^(.*)$ https://${server_name}$1 permanent;
}
server {
listen 443 ssl;
server_name bbs.riceyoung.com;
ssl on;
ssl_certificate /etc/nginx/ssl/bbs.crt;
ssl_certificate_key /etc/nginx/ssl/bbs.key;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
listen 80;
server_name bbs.riceyoung.com;
# rewrite ^(.*)$ https://bbs.riceyoung.com$1 permanent;
# rewrite ^(.*)$ https://${server_name}$1 permanent;
}
server {
listen 443 ssl;
server_name bbs.riceyoung.com;
ssl on;
ssl_certificate /etc/nginx/ssl/bbs.crt;
ssl_certificate_key /etc/nginx/ssl/bbs.key;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
请教大佬们,上面rewrite的那两行有什么区别?
编辑回复