【发布时间】:2014-08-12 18:00:17
【问题描述】:
这是我在default.conf中的设置:
#
# The default server
#
#upstream tomcat_server {
# Tomcat is listening on default 8080 port
# server 127.0.0.1:8080 fail_timeout=0;
# }
server {
listen 80;
server_name xx.xx.xxx.xxx;
root /var/www/html;
charset utf-8;
set $yii_bootstrap "index.php";
# autoindex off;
# rewrite ^/$ /web/ permanent;
location / {
#root /var/www/html;
index index.html $yii_bootstrap;
# proxy_pass http://127.0.0.1:9000/;
#rewrite .* /index.php last;
try_files $uri $uri/ /web/index.php?$query_string;
}
error_page 404 /404.html;
location = /404.html {
root /var/www/html/web;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
location ~ \.php {
#proxy_pass http://127.0.0.1:9000/web/;
fastcgi_split_path_info ^(.+\.php)(.*)$;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
## Images and static content is treated different
location ~* ^.+\.(jpg|jpeg|gif|css|png|js|ico|xml)$ {
access_log off;
expires max;
# root /var/www/html;
}
}
这是我的控制台:
我的会话不工作:
Yii::app()->user->setState('name',$name);
Yii::app()->user->getState('name');
为此我需要 jsessionid。
我该怎么办?
【问题讨论】:
标签: php session yii nginx jsessionid