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 ...
随机推荐
- Java Heap and Stack
Heap(堆)(FIFO): heap是一个运行时数据区, 类的对象从中分配空间.这些对象通过new.newarray.anewarray和multianewarray等指令建立,它们不需要程序代码来 ...
- Java设计模式简单总结
1.单例模式:在应用程序整个生命周期中,单例类的实例只有一个,并且会自动实例化.单例类的构造方法必须为私有,并且提供一个全局访问点 public class Test { private Test() ...
- 5天玩转C#并行和多线程编程 —— 第一天 认识Parallel 转载 https://www.cnblogs.com/yunfeifei/p/3993401.html
5天玩转C#并行和多线程编程系列文章目录 5天玩转C#并行和多线程编程 —— 第一天 认识Parallel 5天玩转C#并行和多线程编程 —— 第二天 并行集合和PLinq 5天玩转C#并行和多线程编 ...
- css玩转文字
<div style=" direction:rtl; unicode-bidi:bidi-override">文字被反转过来了</div> 执行后的效果为 ...
- 5-MySQL高级-事务-回滚(3)
回滚 为了演示效果,需要打开两个终端窗口,使用同一个数据库,操作同一张表 step1:连接 终端1 select * from goods_cates; step2:增加数据 终端2:开启事务,插入数 ...
- neo4j 基本概念和Cypher语句总结
下面是一个介绍基本概念的例子,参考链接Graph database concepts: (1) Nodes(节点) 图谱的基本单位主要是节点和关系,他们都可以包含属性,一个节点就是一行数据,一个关系也 ...
- [转载]Spring AOP 深入剖析
转载自 http://www.cnblogs.com/digdeep/p/4528353.html 多谢@digdeep AOP是Spring提供的关键特性之一.AOP即面向切面编程,是OOP编程的有 ...
- flink流的执行大致流程图
- note : Get FilePathName from FILE_OBJECT
转自:http://blog.csdn.net/lostspeed/article/details/11738311 封了一个函数, 从 FILE_OBJECT 中 得到 FilePathName 在 ...
- thinkphp rabc权限总结
今天晚上把ThinkPHP的权限分配弄明白了,心里的包袱立刻放下了,感觉那个爽啊!稍微记录一下. 背景:CMS系统开发(17do). 项目分组:Admin(后台管理).Home(前台显示). Admi ...