站点在http://magento.ngstorefront.com加载,但url更改为http://35.193.85.53。Siteground支持人员说,我们需要在Google Cloud DNS中管理这一点,而不是通过它们。如何才能使url不更改为IP地址?
详情:
Google Cloud VM --> http://35.193.85.53 (静态IP..此url上的站点加载)
我们的主域ngstorefront.com托管在Siteground.com上
为了使子域http://magento.ngstorefront.com指向35.193.85.53,我们在Siteground中添加了A和CNAME记录,如下所示:
magento.ngstorefront.com. A 35.193.85.53
www.magento.ngstorefront.com. CNAME magento.ngstorefront.com
发布于 2019-03-15 04:24:32
Siteground是错的。
DNS服务器的工作之一是将DNS名称转换为IP地址。
您的web服务器正在重定向。使用curl
向您的供应商证明这一点。
这是一个简单的配置文件修复。
在我的回答中,请注意您的web服务器返回的302
。请注意Location: http://104.197.44.78/index.php/?SID=fmn3h9n2qjhjplchl1070rgff6
您的Your服务器正在将http://magento.ngstorefront.com
重定向到http://104.197.44.78/index.php/?SID=fmn3h9n2qjhjplchl1070rgff6
运行以下命令重复执行以下操作:
curl -i http://magento.ngstorefront.com
返回的结果如下:
HTTP/1.1 302 Found
Date: Thu, 14 Mar 2019 20:20:24 GMT
Server: Apache
Set-Cookie: store=default; expires=Fri, 13-Mar-2020 20:20:24 GMT; Max-Age=31536000; path=/index.php/; HttpOnly
Set-Cookie: PHPSESSID=fmn3h9n2qjhjplchl1070rgff6; expires=Thu, 14-Mar-2019 21:20:24 GMT; Max-Age=3600; path=/; domain=magento.ngstorefront.com; HttpOnly
Expires: Wed, 14 Mar 2018 20:20:24 GMT
Cache-Control: max-age=0, must-revalidate, no-cache, no-store
Pragma: no-cache
Location: http://104.197.44.78/index.php/?SID=fmn3h9n2qjhjplchl1070rgff6
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
X-Frame-Options: SAMEORIGIN
Content-Length: 0
Content-Type: text/html; charset=UTF-8
https://stackoverflow.com/questions/55164229
复制相似问题