nginx i.com.conf
server {
listen 9090;
server_name i.com;
root /Users/chong/Documents/www;
# Load configuration files for the default server block.
location / {
index index.php index.html index.htm;
if (!-e $request_filename) {
#rewrite ^/index.php(.*)$ /index.php?s=$1 last;
#rewrite ^/admin.php(.*)$ /admin.php?s=$1 last;
#rewrite ^(.*)$ /index.php?s=$1 last;
#rewrite ^(.*)$ /admin.php?s=$1 last;
#rewrite '^/admin.php(.*)$' /data.txt last;
#rewrite ^/images/(.*)_(\d+)x(\d+)\.(png|jpg|gif)$ /data.txt last;
rewrite ^/php/midou/admin.php(.*)$ /php/midou/admin.php?s=$1 last; #ok...
#rewrite ^/(.*) http://xy2.163.com permanent; #ok...
break;
}
autoindex on;
autoindex_exact_size on;
autoindex_localtime on;
}
location ~* \.php$ {
fastcgi_index index.php;
fastcgi_pass 127.0.0.1:9001;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
}
error_page 404 /404.html;
location = /40x.html {
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
}
}
server {
listen 9090;
server_name i.com;
root /Users/chong/Documents/www;
# Load configuration files for the default server block.
location / {
index index.php index.html index.htm;
if (!-e $request_filename) {
rewrite ^/(.*)/index.php(.*)$ /$1/index.php?s=$2 last;
rewrite ^/(.*)/admin.php(.*)$ /$1/admin.php?s=$2 last; #ok...
#rewrite ^/(.*) http://xy2.163.com permanent; #ok...
break;
}
autoindex on;
autoindex_exact_size on;
autoindex_localtime on;
}
location ~* \.php$ {
fastcgi_index index.php;
fastcgi_pass 127.0.0.1:9001;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
}
error_page 404 /404.html;
location = /40x.html {
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
}
}
补充:
代理对文件大小的限制,
server {
client_max_body_size 100M;
listen 9096;
server_name gate.chaohuoyy.com;
location / {
proxy_pass http://127.0.0.1/data/index.html;
}
location /svn {
proxy_pass http://192.168.1.95:8080/svn;
}
}
nginx i.com.conf的更多相关文章
- 配置 nginx server 出现nginx: [emerg] "root" directive is duplicate in /etc/nginx/server/blogs.conf:7
在配置nginx 虚拟机时,执行 sudo /usr/sbin/nginx -t 报下面的错误: nginx: [emerg] nginx: configuration file /etc/nginx ...
- 阿里云centOS7.4 nginx: [emerg] "server" directive is not allowed here in /etc/nginx/vhost/xxxxxx.conf:2
里云centOS7.4配置多个站点遇到的问题nginx: [emerg] "server" directive is not allowed here in /etc/nginx/ ...
- [root@offical nginx]# nginx -t nginx: [emerg] module "/usr/lib64/nginx/modules/ngx_http_geoip_module.so" version 1012002 instead of 1016001 in /usr/share/nginx/modules/mod-http-geoip.conf:1 nginx: con
[root@offical nginx]# nginx -tnginx: [emerg] module "/usr/lib64/nginx/modules/ngx_http_geoip_mo ...
- nginx配置文件httpd.conf详解
PS:Nginx使用有两三年了,现在经常碰到有新用户问一些很基本的问题,我也没时间一一回答,今天下午花了点时间,结合自己的使用经验,把Nginx的主要配置参数说明分享一下,也参考了一些网络的内容,这 ...
- 《亲测》nginx webscoket ssl conf配置示例
非crt证书,用的pem,其中 http://localhost:5003 是你要转发到的站点网址 配置的就是 server { listen 80; server_name smarthome.yi ...
- nginx新建nginx_fzjh.conf文件,不使用默认配置文件
worker_processes 4; events{ worker_connections 1024; } http{ server { listen 80; server_name myserve ...
- nginx 分离配置文件 conf.d和default.conf
1. 在 nginx.conf 文件中引用 conf.d 下的所有配置文件 #在http配置节的末尾添加配置引用 http { ... #gzip on; include /etc/nginx/con ...
- Nginx 加载conf.d (内文件***.conf)
include /usr/local/nginx/conf/conf.d/*.conf;
- nginx 的一个conf配置
server { listen 80 default_server; server_name www.caipudq.cn caipudq.cn *.caipudq.cn; root /mnt/www ...
随机推荐
- iOS13适配/黑暗模式的适配/KVC访问私有属性/模态弹窗ViewController 默认样式改变 /LaunchImage即将废弃/蓝牙的权限申请/推送Device Token适配/UIKit 控件变化/StatusBar新增样式
目录 1. KVC访问私有属性 2. 模态弹窗ViewController 默认样式改变 3. 黑暗模式的适配 4. LaunchImage即将废弃 5. 新增一直使用蓝牙的权限申请 6. Sign ...
- Api:目录
ylbtech-Api:目录 1.返回顶部 2.返回顶部 3.返回顶部 4.返回顶部 5.返回顶部 6.返回顶部 作者:ylbtech出处:http://ylbtech.c ...
- 分类-回归树模型(CART)在R语言中的实现
分类-回归树模型(CART)在R语言中的实现 CART模型 ,即Classification And Regression Trees.它和一般回归分析类似,是用来对变量进行解释和预测的工具,也是数据 ...
- Python 文件处理一
1.路径下所有文件(不包含子文件) import os dirs = os.listdir(path) 注:dirs 是一个list 2.遍历路径下所有文件 def file_name(file_di ...
- C++11多线程程序运行错误
编译没有问题,错误如图: 错误原因: http://stackoverflow.com/questio ... ation-not-permitted gcc4.6以后对于ld自动加上了as-need ...
- POJ 3237 /// 树链剖分 线段树区间修改(*-1)
题目大意: 给定树的N个结点 编号为1到N 给定N-1条边的边权. 三种操作: CHANGE k w:将第 k 条边的权值改成 w. NEGATE x y:将x到y的路径上所有边的权值乘 -1. QU ...
- HDU 5531
题目大意: 给定一个n边形的顶点 以每个顶点为圆心画圆(半径可为0) 每个顶点的圆要和它相邻顶点的圆相切(不相邻的可相交) 求所有圆的最小面积总和并给出所有圆的半径 设半径为r1 r2 ... rn, ...
- ThreadPoolTaskExecutor的配置使用
版权声明:本文为博主原创文章,遵循CC 4.0 by-sa版权协议,转载请附上原文出处链接和本声明. 本文链接:https://blog.csdn.net/ft305977550/article/de ...
- Unity中FSM有限状态机
什么是FSM FSM 即有限状态机,它是一个状态管理系统,表示一个对象的几种状态在指定条件下转移行为,即随着条件的不断改变内部状态不断地切换. FSM用处或者使用背景 通常使用FSM去实现一些简单的A ...
- css3的选择器
先来做一下准备工作 页面的效果: 看到上面的框框了吗?我们就是通过给这些框框添加背景色的方式,来让大家,了解css3的选择器的效果,下面正式开始: 关联选择器 E1~E2 选择 E1 后面的兄弟 E2 ...