1
Slienc7 2015-01-04 21:40:00 +08:00
看了半天还是不懂究竟要干嘛
估计这个有帮助: SNI |
2
shixinyu 2015-01-04 21:42:32 +08:00 1
不需要保留提交方法的就301跳转,需要保留原提交方法的就307跳转咯。
你那个文章里也说可以多域名多证书单IP了的。 |
3
declanVox OP @xgowex 我想把一个域名跳转到另外一个域名,两者都带https。(把 https://original.com 跳转为 https://final.com)
``` server { listen 443 ssl; server_name original.com; ssl on; ssl_certificate /etc/nginx/ssl/server.crt; ssl_certificate_key /etc/nginx/ssl/server.key; ssl_protocols SSLv3 TLSv1 TLSv1.1 TLSv1.2; ssl_ciphers HIGH:!aNULL:!MD5; } server { listen 443; server_name original.com; return 301 https://final.com; } ``` 新建的nginx虚拟机的配置文档这样写,为何依然不能达到目标?(返回的是nginx默认主页) |
4
shixinyu 2015-01-06 09:45:05 +08:00 1
server {
listen 443; server_name original.com; charset utf-8; rewrite ^ https://final.com$request_uri? permanent; } |
6
declanVox OP @shixinyu 已解决,原先写法有误
server { listen 443 ssl; server_name original.com; ssl on; ssl_certificate /etc/nginx/ssl/server.crt; ssl_certificate_key /etc/nginx/ssl/server.key; ssl_protocols SSLv3 TLSv1 TLSv1.1 TLSv1.2; ssl_ciphers HIGH:!aNULL:!MD5; location / { rewrite ^/(.*)$ https://final.com/$1 redirect; } } |