thinkphp5 下 的Nginx 伪静态
server {
listen 80;
server_name all.bjed.com;
root "F:\www\asdata";
location / {
index index.html index.htm index.php;
#autoindex on;
if (!-e $request_filename) {
rewrite ^(.*)$ /index.php?s=/$1 last;
break;
}
}
location ~ \.php(.*)$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_split_path_info ^((?U).+\.php)(/?.+)$;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
include fastcgi_params;
}
}
thinkphp3
server {
###SiteName www.bc1.com
listen *:;
server_name www.bc1.com;
root "F:/Visual-NMP-x64/www/BC1";
#error_log "F:/Visual-NMP-x64/logs/Nginx/wwwbc1com-error.log";
#access_log "F:/Visual-NMP-x64/logs/Nginx/wwwbc1com-access.log";
autoindex on;
index index.php index.html index.htm;
location /
{
index index.php;
#ThinkPHP REWRITE支持
if (!-e $request_filename) {
rewrite ^/(.*)$ /index.php?s=$ last;
}
# 跳转设置
if ($host = 'vc.cn') {
rewrite ^/(.*) http://www.vc.cn/$1 permanent;
}
}
location ~ [^/]\.php(/|$)
{
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
if (!-f $document_root$fastcgi_script_name) {
return ;
}
fastcgi_pass 127.0.0.1:;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
include fastcgi_params;
}
}
thinkphp5 下 的Nginx 伪静态的更多相关文章
- Nginx 伪静态教程
1.将多个域名指向同一web目录: server_name www.php100.com php100.com; rewrite ^/$ / redirect; 2.将不带www的域名301转向到带w ...
- Nginx伪静态配置和常用Rewrite伪静态规则集锦
伪静态是一种可以把文件后缀改成任何可能的一种方法,如果我想把php文件伪静态成html文件,这种相当简单的,下面我来介绍nginx 伪静态配置方法 nginx里使用伪静态是直接在nginx.conf ...
- [转]Nginx伪静态配置和常用Rewrite伪静态规则集锦
Nginx伪静态配置和常用Rewrite伪静态规则集锦 作者: 字体:[增加 减小] 类型:转载 时间:2014-06-10 我要评论 伪静态是一种可以把文件后缀改成任何可能的一种方法,如果我想把ph ...
- phpstudy配置php7.1.11 + phpstudy nginx伪静态
切记要把新的php版本配到环境变量,cmd才会生效 php7.1.11下载地址 http://windows.php.net/download/ 下载之后,解压. 重名的为php-7.1.11-nts ...
- 关于destoon6.0下的ngnix伪静态
关于destoon6.0下的ngnix伪静态配置 ##rewrite nginx rewrite '(.*)\.(asp|aspx|asa|asax|dll|jsp|cgi|fcgi|pl)(.*)' ...
- windows 下使用Nginx替代apache作为服务器
说实话, 在windows下使用Nginx 着实有点不太方便, 但因项目需求, 又不想换系统(虽然可以搞个虚拟机玩), 只能用Nginx了 好了, 不多说了. 开始... 首先我用的是xampp包(A ...
- Windows下安装Nginx+php+mysql环境
系统:Windows 7 64位系统 安装之前,首先下载软件: Nginx: http://nginx.org/en/download.html PHP Stable PHP 5.6.26: http ...
- windows下安装nginx
说起开发,自己感到非常惭愧,由于公司让我给<绿电侠>项目写整体架构解决方案,才开始接触nginx这个东东,突然觉得它是一把非常好的利器. 本文主要记录在windows下安装nginx,另参 ...
- CentOS下配置nginx conf/koi-win为同一文件的各类错误
今天配置CentOS6.5下安装Nginx + php7 + mysql5.7.15遇到了一些坑.本来家里的电脑在配置环境的时候没有问题,拿去公司的电脑上就是到处报错.不知道是不是人品问题.今晚在家重 ...
随机推荐
- Memcached append 命令
Memcached append 命令用于向已存在 key(键) 的 value(数据值) 后面追加数据 . 语法: append 命令的基本语法格式如下: append key flags expt ...
- STOMP协议规范【转】
STOMP协议规范英文原文:http://stomp.github.io/stomp-specification-1.2.html STOMP协议规范译文原文:http://simlegate.com ...
- Python编程
1.pip的使用.安装 pip show 显示输出版本 pip -V 是否安装成功 pip --help 查看相关帮助
- 通用Mapper相关
1.通用Mapper中,用@Table来映数据表与实体,其中 name:指定表的名称,例如@Table(name="ls_post") catalog: 指定数据库名称,默认为当前 ...
- Windows下查看占用端口程序
配置shadowsocks,发现本地1080端口被占用,当然更改没有占用的端口即可.当然还得查找下什么程序占用的.无奈,看了下115浏览器占用此端口,浏览器不能管啊,你懂得!!! Windows查找下 ...
- 面向对象:三大特性、类成员、property
一.类的基础知识 python 一切皆为对象. 我们以前的str,list,int 都是对象. 1.1 类的定义 与 调用 class 关键字用来定义类,注意类名首字母大写. 类的调用,先实例化一个类 ...
- 虚拟机VirtualBox及轻量级的CentOS
1,先下载虚拟机VirtualBox和centos(下边有链接),将VirtualBox安装在本机 2,管理 --> 导入虚拟电脑 --> 选择本地centos文件 3,点击下一步 - ...
- 基于centos的docker安装
1. 安装需求 内核版本3.10以上 Centos 7以上 64位版本 2. 使用root登录或者具有sudo权限 3. 确保系统是最新的 yum update 4. 添加yum源 tee /etc/ ...
- Java 进阶7 并发优化 5 并发控制板方法
Java 进阶7 并发优化 5 并发控制板方法 20131114 前言: Java 中多线程并发程序中存在线程安全的问题,之前学习 Java的同步机制,掌握的同步方法只有一种就是使用 ...
- Java 进阶7 并发优化 1 并行程序的设计模式
本章重点介绍的是基于 Java并行程序开发以及优化的方法,对于多核的 CPU,传统的串行程序已经很好的发回了 CPU性能,此时如果想进一步提高程序的性能,就应该使用多线程并行的方式挖掘 CPU的 ...