安装和配置:

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;
}
}

thinkphp nginx配置的更多相关文章

  1. thinkphp nginx 配置

    thinkphp convention配置:'URL_MODEL' => '2', //URL模式 nginx rewrite配置: if (!-e $request_filename) { r ...

  2. thinkphp的nginx配置

    thinkphp的nginx配置 server { listen 80; server_name www.abc.com; #charset utf-8; access_log /var/www/ww ...

  3. nginx 配置web 虚拟文件夹 而且codeIgniter,thinkphp 重定向url 地址

    nginx 配置虚拟文件夹而且url 重定向 server { #侦听80port listen 8090; #定义使用www.xx.com訪问 server_name 127.0.0.1; #设定本 ...

  4. thinkphp nginx php-fpm url rewrite 导致 404 错误

    ## thinkphp nginx php-fpm url rewrite 导致 404 错误 之前thinkphp的系统部署在apache上,考虑到在并发性能nginx比apache强悍得多,所以在 ...

  5. nginx配置相关

    一.autoindex on; 能解决无端端的403问题. 二.NGINX配置超时时间 1.啥时候用到 用来设置请求资源和服务器返回的时间,保证一个请求占用固定时间,超出后报504超时!这样可以保证一 ...

  6. nginx配置pathinfo支持,最佳方案 - chunyu

    〇. 前言 pathinfo有两个,1 pathinfo()函数,2 $_SERVER['PATH_INFO'].pathinfo()是php的库函数,原生支持不需要nginx配置,$_SERVER[ ...

  7. centos6.8 环境一键安装包 nginx配置thinkphp5

    ---恢复内容开始--- lnmp1.4 一键安装包 nginx配置thinkphp5     环境:Nginx1.12.1  PHP5.6  Coentos6.8 修改网站配置文件      ser ...

  8. nginx配置ThinkPHP5二级目录访问

    可以通过 http://www.mracale.com/项目名/模块名/方法名 进行访问 第一步 首先,你要确保在不配置二级目录的情况下,可以通过浏览器访问到.例如:http://www.mracal ...

  9. nginx配置反向代理或跳转出现400问题处理记录

    午休完上班后,同事说测试站点访问接口出现400 Bad Request  Request Header Or Cookie Too Large提示,心想还好是测试服务器出现问题,影响不大,不过也赶紧上 ...

随机推荐

  1. 配置rc.local开机自启动文件的疑问

    有时我们自己在/etc/rc.d/rc.local里面增加的随机器启动的脚本和指令总是不能自动加载和启动,,机器启动后手动执行脚本又能成功,经常被搞得晕头转向的.最近我经过1天的辛苦测试和查找资料,终 ...

  2. CodeForces #367 div2 C

    题目链接: Hard problem 题意:每个字符串可以选择反转或者不反转,给出反转每个字符串的代价,问使最少的代价使得这个字符串序列成字典序. dp[i][j] = x : 第一维是第i个字符串, ...

  3. 上下文菜单项(contextMenu)----长按按钮弹出菜单项

    <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android=&quo ...

  4. java中的传值与传引用

    java函数中的传值和传引用问题一直是个比较“邪门”的问题,其实java函数中的参数都是传递值的,所不同的是对于基本数据类型传递的是参数的一份拷贝,对于类类型传递的是该类参数的引用的拷贝,当在函数体中 ...

  5. 10-20日 && 抽签问题

    Ants # include <cstdio> #include <algorithm> ; int L, n, x[MAX_N]; void solve() { ; ; i ...

  6. BZOJ 3670 && BZOJ 3620 && BZOJ 3942 KMP

    最近感到KMP不会啊,以前都是背板的现在要理解了. #include <iostream> #include <cstring> #include <cstdio> ...

  7. C# winform应用程序仅能打开一个进程运行

    判断程序是否已经运行,使程序只能运行一个实例: 方法1: //这种检测进程的名的方法,并不绝对有效.因为打开第一个实例后,将运行文件改名后,还是可以运行第二个实例. private static bo ...

  8. attention 机制

    参考:modeling visual attention via selective tuning attention问题定义: 具体地, 1) the need for region of inte ...

  9. Maven生命周期详解

    来源:http://juvenshun.iteye.com/blog/213959 Maven强大的一个重要的原因是它有一个十分完善的生命周期模型(lifecycle),这个生命周期可以从两方面来理解 ...

  10. hdu 4336 Card Collector

    dp+状态压缩 #include<cstdio> using namespace std; ]; <<]; int main() { int n; while(scanf(&q ...