我有一个域名
https://secondubly.tv
安装SSL重定向到另一个网站-这部分工作非常好。我还有一个子域没有用SSL设置-
bot.secondubly.tv
但每次我尝试访问它时,都会被重定向到
https://secondubly.tv
这反过来又将我重定向到另一个网站。我想它只是忽略了第一个街区,然后去了它下面的街区。我真的在为如何让它工作而挣扎
没有
SSL,可能需要一些帮助。
# Server that handles sending non-SSL traffic to SSL.
server {
listen 80;
listen [::]:80;
server_name bot.secondubly.tv www.bot.secondubly.tv;
location / {
proxy_pass http://localhost:25000;
}
}
server {
server_name secondubly.tv www.secondubly.tv;
return 301 https://twitch.tv/secondubly$request_uri;
listen 443 ssl; # managed by Certbot
ssl_certificate key; # managed by Certbot
ssl_certificate_key key; # managed by Certbot
include ...nginx.conf; # managed by Certbot
ssl_dhparam ...dhparams.pem; # managed by Certbot
}
server {
if ($host = www.secondubly.tv) {
return 301 https://$host$request_uri;
} # managed by Certbot
if ($host = secondubly.tv) {
return 301 https://$host$request_uri;
} # managed by Certbot
server_name secondubly.tv www.secondubly.tv;
listen 80;
return 404; # managed by Certbot
}
我觉得我只是不理解一些基本的东西?为什么它要跳过代理通行证部分?服务器名称在那里,而且它们是准确的,那么给出了什么呢?