为什么当我输入子域的地址时总是显示域的网页? [英] Why did it always show my domain's webpage when I enter my subdomain's address?

查看:108
本文介绍了为什么当我输入子域的地址时总是显示域的网页?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个域- kongming.io .我想在 kongming.io 的主页上创建一个链接到子域 song.kongming.io 时,它将显示网站的主页面

I have a domain - kongming.io. I want to create a link on the main page of kongming.io which links to the subdomain song.kongming.io. But when I click that button or type song.kongming.io directly in the explorer, it shows the main website page.

我已经尝试了几天,在互联网上搜索有关

I have been trying for several days, searching tutorials on the internet about How To Host Multiple Websites Securely With Nginx And Php-fpm On Ubuntu 14.04. I tried many many many tutorials, but no one works. Even though I did the exactly the same as the tutorial shows.

设置似乎很容易,但是即使花了那么多时间,为什么我仍然失败了?

It looks so easy to set the config, but why did I still fail even I have spent so much time.

以下是一些基本信息:

我的子域: song.kongming.io ,我想在其上创建一个链接链接到的主要网站.

My subdomain: song.kongming.io, which I want to create a link on my main website to link to.

我的主持人: digitalocean

我正在尝试使用 nginx 托管多个站点

I am trying to use nginx to host multiple sites

我的数字海洋滴设置:

我的配置设置与

And my config settings are the same as the tutorial shows. FYI, it is showed below.

server {
listen 80;
listen [::]:80;

root /var/www/song.kongming.io;
index index.html index.htm;

server_name song.kongming.io www.song.kongming.io;

location / {
    try_files $uri $uri/ =404;
}
}

如果您能提出任何建议或任何可能导致我的问题的潜在原因,我将不胜感激.我不知道我的设置有什么问题,因为我是后端Web服务的新手,而且我确实做了很多尝试.预先感谢!

If you can point out any suggestions or any potential reasons that can cause my problem, I would be really appreciate. I don't know what is wrong with my settings, because I am new to the back end web services, and I really tried a lot. Thanks in advance!

推荐答案

问题是如此棘手.我的一位朋友告诉我清除浏览器的cookie和历史记录,然后我做到了.而且有效!

The problem is so tricky. One of my friend told me to clear the cookies and histories of my browser, and I did. And it works!

因此,这与nginx配置或域设置无关.这是因为浏览器历史记录中仍然存在一些不良情况.

So this has nothing to do with the nginx config or domain settings. This is because of some bad things remaining in the history of browser.

我不知道为什么,这只是发生了.

I don't know why, it just happened.

这篇关于为什么当我输入子域的地址时总是显示域的网页?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆