安装和配置:

http://www.cnblogs.com/Bonker/p/4252588.html 

spawn-fcgi 要先安装和启动:(已过时)

sudo spawn-fcgi -a 127.0.0.1 -p  -u www-data -g www-data -f /usr/bin/php5-cgi -C 

新:

sudo service php5-fpm restart

tp的nginx配置

server {
listen ;
server_name jktest.sysu.edu; # 改成所配域名,在 /etc/hosts下增加
root /var/www/jktest; # 根地址
index index.html index.htm index.php; error_page /.html;
location = /.html {
return 'Sorry, File not Found!';
}
error_page /50x.html;
location = /50x.html {
root /usr/share/nginx/html; # windows用户替换这个目录
} location / {
try_files $uri @rewrite;
} location @rewrite {
set $static ;
if ($uri ~ \.(css|js|jpg|jpeg|png|gif|ico|woff|eot|svg|css\.map|min\.map)$) {
set $static ;
} if ($static = ) {
rewrite ^/(.*)$ /index.php?s=/$;
} } location ~ /Uploads/.*\.php$ {
deny all;
} location ~ \.php/ {
if ($request_uri ~ ^(.+\.php)(/.+?)($|\?)) { }
fastcgi_pass 127.0.0.1:;
include fastcgi_params;
fastcgi_param SCRIPT_NAME $;
fastcgi_param PATH_INFO $;
fastcgi_param SCRIPT_FILENAME $document_root$;
} location ~ \.php$ {
fastcgi_pass 127.0.0.1:;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
} location ~ /\.ht {
deny all;
}
}

最新文章

  1. nodejs之get/post请求的几种方式
  2. connect mysql from another host
  3. js简单的设置快捷键,hotkeys捕获键盘键和组合键的输入
  4. PHP的流程控制结构
  5. WIFI基本知识整理
  6. codeforces 652C Foe Pairs 水题
  7. HDU 1042 N!(高精度计算阶乘)
  8. easy ui 实现gridview效果
  9. Leetcode算法刷题:第100题 Same Tree
  10. DDS视图&Button控件
  11. Android离线缓存
  12. 老李分享:《Java Performance》笔记1——性能分析基础 1
  13. laravel blade模板介绍
  14. 跟我一起读postgresql源码(九)——Executor(查询执行模块之——Scan节点(上))
  15. jsp篇 之 指令元素和动作元素
  16. Go-day01
  17. NodeJs学习相关网址
  18. JavaScrip(二)JavaScrip语法基础
  19. poj 3660 传递闭包 **
  20. 移动端视频h5表现问题汇总

热门文章

  1. Project2010简易操作指南[转]
  2. hdoj 4323
  3. SPOJ GSS1 静态区间求解最大子段和
  4. servlet执行流程
  5. mysqld.exe占比cpu 100% 解决方案
  6. OC 解决NSArray、NSDictionary直接打印中文出现乱码的问题
  7. sphinx 增量索引 实现近实时更新
  8. Jquery和Javascript 实际项目中写法基础-闭包 (2)
  9. Map/Reduce 工作机制分析 --- 错误处理机制
  10. HDU 2277 Change the ball