vào lúc này tôi đang chạy một trang web trong nginx/1.6.3 trên centOS7Nginx SSL/Subdomain/IP chuyển hướng
Tất cả mọi thứ chạy trơn tru, ngoại trừ một số chuyển hướng.
Đây là những gì tập tin conf của tôi trông giống như:
server {
listen 443 ssl spdy default deferred;
server_name .example.com;
... more configs
}
server {
listen 80;
server_name .example.com;
return 301 https://example.com$request_uri;
}
Những gì tôi muốn thực hiện là các tình huống sau:
user visits in browser | this should happen
------------------------------------|-------------------------------------
https://example.com$request_uri | Just deliver content
https://*.example.com$request_uri | 301 https://example.com$request_uri
https://123.123.123.123$request_uri | 301 https://example.com$request_uri
http://example.com$request_uri | 301 https://example.com$request_uri
http://*.example.com$request_uri | 301 https://example.com$request_uri
http://123.123.123.123$request_uri | 301 https://example.com$request_uri