简体   繁体   English

Cakephp 2.x托管域https不起作用

[英]Cakephp 2.x parked domain https not working

I have a domain where my code is hosted, and two other domains parked over that domain. 我有一个托管代码的域,另外两个域停放在该域上。

So my code is hosted at domain.com and when I go to domain2.com or domain3.com, the contents of the sites show whatever is hosted at domain.com. 因此,我的代码托管在domain.com上,当我转到domain2.com或domain3.com时,网站的内容将显示在domain.com上托管的内容。 The content delivered is based on the url being accessed, so domain2.com would show something different than domain3.com, as I get the url by setting $domain = $_SERVER['HTTP_HOST']; 传递的内容基于所访问的URL,因此domain2.com会显示与domain3.com不同的内容,因为我通过设置$ domain = $ _SERVER ['HTTP_HOST']来获取URL。

This works just fine for the http versions of the website, but when I try to access any https versions, it gives a cake error: 这对于网站的http版本来说很好用,但是当我尝试访问任何https版本时,都会出现蛋糕错误:

URL rewriting is not properly configured on your server. 您的服务器上没有正确配置URL重写。 1) Help me configure it 2) I don't / can't use URL rewriting 1)帮我配置它2)我不/不能使用URL重写

That happens on all 3 domains. 这在所有3个域中都发生。 That page also doesn't have any styling. 该页面也没有任何样式。 Cake also can't connect to my database: Cake也无法连接到我的数据库:

Database connection "SQLSTATE[HY000] [1129] Host 'xxx-xx-xxx-x.unifiedlayer.com' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'" is missing, or could not be created. 数据库连接“ SQLSTATE [HY000] [1129]主机xxx-xx-xxx-x.unifiedlayer.com由于许多连接错误而被阻止;使用'mysqladmin flush-hosts'进行取消阻止”丢失,或无法创建。

I've tried looking for that text inside my app folder, to see if I could at least change the contents of that error page, but if I change the text, it doesn't change it in the error page. 我尝试在我的应用程序文件夹中查找该文本,以查看是否至少可以更改该错误页面的内容,但是如果我更改了该文本,则不会在错误页面中对其进行更改。 I've also tried changing all htaccess files, even deleting their content, but that only affects the http versions, and not the https. 我也尝试过更改所有htaccess文件,甚至删除它们的内容,但这仅影响http版本,而不影响https。

I'm starting to think that the https pages are trying to access a different domain that I have, but I don't see how that would be possible. 我开始认为https页面正在尝试访问我拥有的其他域,但是我不知道这怎么可能。

All 3 domains have ssl certificates and they were all working correctly before I parked the domains. 所有3个域都有ssl证书,并且在我将其停放之前,它们都可以正常工作。

Any help is much appreciated. 任何帮助深表感谢。 I can also provide more details on this issue. 我还可以提供有关此问题的更多详细信息。

You should do exactly what the mysql error says. 您应该完全按照mysql错误的指示进行操作。 Flush the hosts from the main database server. 从主数据库服务器刷新主机。 Check you have whitelisted your websites on a firewall/iptables. 检查您是否已将您的网站列入防火墙/ iptables的白名单。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM