thinkphp nginx配置
安装和配置:
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配置的更多相关文章
- thinkphp nginx 配置
thinkphp convention配置:'URL_MODEL' => '2', //URL模式 nginx rewrite配置: if (!-e $request_filename) { r ...
- thinkphp的nginx配置
thinkphp的nginx配置 server { listen 80; server_name www.abc.com; #charset utf-8; access_log /var/www/ww ...
- nginx 配置web 虚拟文件夹 而且codeIgniter,thinkphp 重定向url 地址
nginx 配置虚拟文件夹而且url 重定向 server { #侦听80port listen 8090; #定义使用www.xx.com訪问 server_name 127.0.0.1; #设定本 ...
- thinkphp nginx php-fpm url rewrite 导致 404 错误
## thinkphp nginx php-fpm url rewrite 导致 404 错误 之前thinkphp的系统部署在apache上,考虑到在并发性能nginx比apache强悍得多,所以在 ...
- nginx配置相关
一.autoindex on; 能解决无端端的403问题. 二.NGINX配置超时时间 1.啥时候用到 用来设置请求资源和服务器返回的时间,保证一个请求占用固定时间,超出后报504超时!这样可以保证一 ...
- nginx配置pathinfo支持,最佳方案 - chunyu
〇. 前言 pathinfo有两个,1 pathinfo()函数,2 $_SERVER['PATH_INFO'].pathinfo()是php的库函数,原生支持不需要nginx配置,$_SERVER[ ...
- centos6.8 环境一键安装包 nginx配置thinkphp5
---恢复内容开始--- lnmp1.4 一键安装包 nginx配置thinkphp5 环境:Nginx1.12.1 PHP5.6 Coentos6.8 修改网站配置文件 ser ...
- nginx配置ThinkPHP5二级目录访问
可以通过 http://www.mracale.com/项目名/模块名/方法名 进行访问 第一步 首先,你要确保在不配置二级目录的情况下,可以通过浏览器访问到.例如:http://www.mracal ...
- nginx配置反向代理或跳转出现400问题处理记录
午休完上班后,同事说测试站点访问接口出现400 Bad Request Request Header Or Cookie Too Large提示,心想还好是测试服务器出现问题,影响不大,不过也赶紧上 ...
随机推荐
- iptables基本规则
注意:iptables只能被拥有超级权限的用户设置. 重启 清空 iptables 规则:在终端输入: iptables -F iptables -X iptables -t nat -F i ...
- (BFS)poj1465-Multiple
题目地址 题意可理解为我们有一些给定的元素,要用它们组成数,如果一个长度(x)所有组成的数都不是给定的另一个数(n)的倍数,并且长度为x的数中有模n的不同于长度小于x的数模n的数,那么继续延长这个数的 ...
- find_in_set()
$where[]="find_in_set('".$grades."',a.grades)";
- 6、android 网络编程
1.基于socket的用法 服务器端: 先启动一个服务器端的socket ServerSocket svr = new ServerSocket(8989); 开始侦听请求 Socket s ...
- quartz.net 使用(一)-执行定时计划任务
一.使用nuget安装所需要的包 Install-Package Quartz 二.实现自己的job继承IJob public class FirstJob : IJob { public void ...
- 点击含下拉菜单的列表/表单按钮:通过JS创建虚拟按钮并点击
${JsCode} | Get Element Attribute | XPATH=//table[@class='mnubar']//tr//td//span[text()='${MenuArr[0 ...
- 数据库最大连接池max pool size
本文导读:Max Pool Size如果未设置则默认为100,理论最大值为32767.最大连接数是连接池能申请的最大连接数,如果数据库连接请求超过此数,后面的数据库连接请求将被加入到等待队列中,这会影 ...
- sqlserver08评估期已过的解决方法
打开sqlserver出现提示:评估期已过.有关如何升级的测试版软件的信息,请访问http://www.microsoft.com/sql/howtobuy 解决方法如下: 第一步:进入开始菜单--- ...
- thrift编译安装
关于thrift的介绍:http://www.ibm.com/developerworks/cn/java/j-lo-apachethrift/ Apache Thrift 是 Facebook 实现 ...
- linux下locate为什么有时候某些文件
这与locate命令的工作原理有关.他是通过查询数据库的方式查找文件的.并且数据库每天更新一次.你要找的文件可能没有更新到数据库中. 可以有两种选择: 第一,过一天后再查看一下,应该就会找到了. 第二 ...