地址
可以登录这个网址查看,
nginx配置参考了
1.nginx配置
2.pathinfo
server {
listen 80;
server_name localhost;
root /var/www; index index.html index.htm index.php; #charset koi8-r; #access_log /var/log/nginx/log/host.access.log main; location / { try_files $uri $uri/ /index.php$is_args$args; } #error_page 404 /404.html; # redirect server error pages to the static page /50x.html # error_page 500 502 503 504 /50x.html; location = /50x.html { root /usr/share/nginx/html; } # proxy the PHP scripts to Apache listening on 127.0.0.1:80 # #location ~ \.php$ { # proxy_pass http://127.0.0.1; #} # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 # location ~ \.php$ { try_files $uri = 404; fastcgi_pass 127.0.0.1:9000; fastcgi_split_path_info ^(.+\.php)($|/.*); fastcgi_split_path_info ^(.+.php)(.*)$; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } # deny access to .htaccess files, if Apache's document root # concurs with nginx's one # #location ~ /\.ht { # deny all; #}
}
还有一个问题是thinkphp在sae上使用的时候的问题
Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
错误位置
FILE: /data1/www/htdocs/520/cruise/1/ThinkPHP/Extend/Engine/Sae/Lib/Driver/Db/DbMysql.class.php LINE: 78
ThinkPHP3.1.3 { Fast & Simple OOP PHP Framework } -- [ WE CAN DO IT JUST THINK ]
(不太会markdown
![]() | 1 crabRunning 2015-04-24 10:35:29 +08:00 什么年代了还用thinkphp |
![]() | 2 Nicksxs OP @crabRunning 我很渣的 |
![]() | 3 crabRunning 2015-04-24 11:24:19 +08:00 @Nicksxs 吊炸天竟然用php7 |
![]() | 4 hisokc 2015-04-24 11:27:40 +08:00 报的mysql错误,应该是mysql没启动或配置问题吧 |
![]() | 5 crabRunning 2015-04-24 11:33:19 +08:00 别那么早用php ng人家还没正式发布,等别人把问题撸圆再用也不迟,如果你不是大神,遇到新版本的问题你去找鸟哥啊。还有nginx pathinfo 没有开启yeah |
6 zts1993 201504-24 12:24:07 +08:00 via Android nginx配置tp手册有。。还要开启pathinfo 第二个问题sae的数据库明显不是localhost...配置问题 |
7 axe 2015-04-24 12:42:34 +08:00 SAE 有指定的数据库配置, 在配置里面写SAE提供的那几个常量吧 |
8 feiyuanqiu 2015-04-24 12:57:22 +08:00 不能连接数据库你可以看下这几个地方: 1、ps -ef | grep mysql 看下 mysql 启动没有 2、ls /var/lib/mysql/mysql.sock 看下这个存不存在 3、mysql -u(你在php数据库连接配置文件里面设置的数据库用户名) -p 看下能不能登进去 4、如果数据库在远程,还要看下 iptables 的配置,是不是把远程访问数据库给 DROP 了 |
![]() | 9 iLtc 2015-04-24 13:16:37 +08:00 ThinkPHP 3.1 的版本要在 SAE 上运行需要下载 SAE引擎版本(http://www.thinkphp.cn/down/356.html),这个会自动适配 SAE的数据库,并且自动将缓存写进 Memcache |
10 g8287694 2015-04-24 17:06:00 +08:00 @crabRunning 那现在开发用什么? |
![]() | 11 tanywei 2015-04-24 18:18:41 +08:00 居然敢用thinkphp。。。 |
![]() | 12 tanteng 2015-04-25 00:36:15 +08:00 via iPhone @crabRunning 你们现在用什么框架 |
![]() | 13 111111111111 2015-04-29 10:02:18 +08:00 @tanywei 有什么坑吗? |