Localhost - 您的浏览器阻止或不支持Cookie

我只是在我的localhost上设置了这个多站点wordpress。 它由一个域(local.mydomain.com)和两个子域(local.site2.mydomain.com和local.site3.mydomain.com)组成。</ p>

一切都完美适用于root 域名,我可以登录并转到后端,但是当我尝试登录任何子域名时,我会收到“Cookie被阻止或浏览器不支持”。 错误。</ p>


  • 是的,我的cookie已启用。 </ li>
  • 我尝试了wp-config define hack </ li>
  • 清除缓存</ li>
  • 已禁用的插件和主题</ li>
  • 更新到4.0 </ li>
    </ ul>

    我发现之前已经发布了很多次,但我还没有看到最近的帖子,也没有看到localhost版本中的多站点 那个错误。</ p>

    希望有人可以帮助我。 干杯!</ p>
    </ div>

展开原文

原文

I just set up this multisite wordpress on my localhost. It consists of a domain (local.mydomain.com) and 2 subdomains (local.site2.mydomain.com and local.site3.mydomain.com).

Everything works perfectly for the root domain, I can log in and go to the backend just fine, but when I try to log into any of the subdomains I get the "Cookies are blocked or not supported by your browser." error.

  • Yes, my cookies are enabled.
  • I tried the wp-config define hack
  • Cleared cache
  • Disabled plugins and themes
  • Updated to 4.0

I realize this has been posted many times before, but I haven't seen a recent post for this nor I have seen the multisite in localhost version of that error.

Hopefully someone can help me out. Cheers!

1个回答



你说“我试过wp-config”定义hack。 我不确定你的意思,但在我的情况下,它通过在 wp-config.php </ code>文件中设置下面的一个来工作:</ p>

define('COOKIE_DOMAIN',false); </ code> </ p>

另一方面,如果您使用Apache作为Web服务器,那么检查您的Apache配置是否 enabled mod_security </ code> 已启用。 这将阻止cookie等事情。 因此,如果它已启用,则只需尝试禁用此模块并再次检查。 如果是问题的原因,请检查其配置,尤其是与cookie相关的任何设置。</ p>

此Apache模块的设置可以存储在名为 modsecurity.conf的文件中 </代码>。 甚至在Apache的 httpd.conf </ code>中也可以找到它们。 无论如何,你有了这个想法。</ p>
</ div>

展开原文

原文

You said "I tried the wp-config" define hack. I'm not sure what you mean by that but in my case it worked by setting the one below in the wp-config.php file:

define('COOKIE_DOMAIN', false);

One the other hand, if you are using Apache as a web server then check in your Apache configuration if you have enabled mod_security turned ON. This will prevent, among others, the cookie thing. So if it is enabled then just try to disable this module and check again. If it is the cause of the problem then check its configuration, particularly any settings related to cookies.

The settings for this Apache module may be stored within a file named modsecurity.conf. They may be found even in Apache's httpd.conf as well. You got the idea, anyway.

dongtai6741
dongtai6741 它帮了..谢谢
大约 5 年之前 回复
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问
相关内容推荐