2. listen 80;
3. root /usr/share/nginx/www;
4. index index.html index.htm index.php;
5. server_name localhost;
6.
7. location / {
8. if (!-e $request_filename) {
9. rewrite ^(.*)$ /index.php?s=$1 last;
10. break;
11. }
12. }
13.
14. # 开启PHP支持
15. location ~ \.php {
16. fastcgi_split_path_info ^(.+\.php)(.*)$;
17. fastcgi_pass unix:/var/run/php5-fpm.sock;
18. fastcgi_index index.php;
19.
20. # PATH_INFO配置
21. fastcgi_param PATH_INFO $fastcgi_path_info;
22.
23. # 环境变量
24. fastcgi_param CT_DEV_MODE 'true';
25.
26. # 加载Nginx默认"服务器环境变量"配置
27. include fastcgi_params;
28. }
29.}
详细步骤:http://www.corethink.cn/manual/doc/corethink1_1.html#68
最佳答案