这是通过 drush 全新安装的 Drupal 7。
使用firebug,我可以看到cookie在我尝试登录后被发送回响应头。页面被重定向到主页(/节点)。会话记录也保存在会话表中。没有错误。服务器错误日志上也没有错误。
同一台服务器正在托管具有登录功能的其他站点。相同的浏览器可以毫无问题地登录其他站点。以 Wordpress 为例。Cookie 肯定是启用的。
服务器运行 Nginx, PHP-fpm
附件是我网站的 nginx 设置。我不确定它是否与干净的网址有关。从浏览器中,我确实看到了干净的 url。我可以进入 /user、/user/register、/user/password 页面。
server
{
listen 80;
server_name www.testd720.com;
index index.php index.html index.htm;
root /opt/www/drushtest/web1;
#error_page 404 = @drupal;
#location / {
# # This is cool because no php is touched for static content
# try_files $uri $uri/ @rewrite;
# expires max;
#}
#location @drupal {
# rewrite ^(.*)$ /index.php?q=$1 last;
#}
location / {
if (!-e $request_filename) {
rewrite ^/(.*)$ /index.php?q=$1 last;
break;
}
}
location ~ .*\.(php|php5)?$
{
#fastcgi_pass unix:/tmp/php-cgi.sock;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fastcgi.conf;
}
access_log logs/testd720.log main;
}
标题:
Cache-Control no-cache, must-revalidate, post-check=0, pre-check=0
Connection keep-alive
Content-Language en
Content-Type text/html; charset=utf-8
Date Thu, 07 Mar 2013 09:47:37 GMT
Etag "1362649657"
Expires Sun, 19 Nov 1978 05:00:00 GMT
Last-Modified Thu, 07 Mar 2013 09:47:37 +0000
Location http://www.testd720.com/node
Server nginx/1.2.0
Set-Cookie SESS26bc541d314e909277ae077251e81e7a=qu7a2apzFE9ALHnLWc04N-t_JoHhh2UCR2MkmKROVG0; expires=Sat, 30-Mar-2013 13:20:57 GMT; path=/tmp; domain=.testd720.com; HttpOnly
Transfer-Encoding chunked
X-Powered-By PHP/5.4.3