MediaWiki会话和Cookie不能在CloudFlare后面的多服务器上工作 [英] MediaWiki sessions and cookies not working on multi-server behind CloudFlare

查看:2106
本文介绍了MediaWiki会话和Cookie不能在CloudFlare后面的多服务器上工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个MediaWiki在多个AWS实例上运行,登录和注册失败。 session.save_path设置为/ tmp,任何人都可以写入和读取。我使用Apache2和PHP5以及MEMCACHED。

I have a MediaWiki running on multiple AWS instances and login and registration is broken. The session.save_path is set to /tmp which is writeable and readable by anyone. I use Apache2 and PHP5 as well as MEMCACHED.

每当您尝试登录时,您都会得到有关防止会话劫持或关闭Cookie的通知。这些是错误:

Whenever you try to login you either get informed that there is protection against session hijacking or that you have cookies off. These are the errors:


您的登录会话似乎有问题;此操作已被取消,以防止会话劫持。返回上一页,重新载入该网页,然后再试一次。

There seems to be a problem with your login session; this action has been canceled as a precaution against session hijacking. Go back to the previous page, reload that page and then try again.








Wiki使用Cookie登录用户。您已禁用Cookie。请
启用它们,然后重试。

Wiki uses cookies to log in users. You have cookies disabled. Please enable them and try again.

我使用格式为.domain.tld的共享cookiedomain整个域都在CloudFlare和Amazon ELB负载均衡器之后。所有LocalSettings.php都相同,并且Apaches有共享配置。

I use a shared cookiedomain in the format ".domain.tld" and the entire domain is behind CloudFlare and an Amazon ELB load balancer. All LocalSettings.php are the same and the Apaches have shared configurations.

推荐答案

Aaron Schulz ,不使用默认会话处理,这是灾难性的。

Per Aaron Schulz, don't use the default session handling, it's disastrous.

您已启用memcached,请添加

As you have memcached enabled, add

$wgMainCacheType = CACHE_ANYTHING;
$wgSessionsInObjectCache = true;



<知道事情是否改善(他们绝对应该)。

in your LocalSettings.php and let us know if things improved (they definitely should).

这篇关于MediaWiki会话和Cookie不能在CloudFlare后面的多服务器上工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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