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 ...
随机推荐
- 绘制delphi窗体的标题栏
绘制delphi窗体的标题栏 按照设计,Delphi窗体的“标题”属性是由Windows负责绘制,标题栏在系统菜单旁边.如果你不想改变窗体的标题属性又想在窗体的标题栏添加一些自己的内容,你需要处理一个 ...
- 再学 GDI+文本输出文本样式
代码文件: unit Unit1; interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls ...
- NX二次开发-UFUN关闭本地文本文档uc4540
1 NX9+VS2012 2 3 #include <uf.h> 4 #include <uf_cfi.h> 5 #include <uf_ui.h> 6 7 us ...
- iOS ARC使用总结
在iOS ARC模式下,编译器会自动插入release 有些时候程序出现 message sent to deallocated object的时候,你不知道什么原因. 一种原因是因为你在ARC下使用 ...
- mysql删除字段为null的数据
delete FROM main_bussiness_cost1 where date is null; 不能用 date = null:
- 基于pandas数据预处理基础操作
# -*- coding: utf-8 -*- import numpy as np import pandas as pd #一.创建数据 #1.通过传递一个list对象来创建一个Series,pa ...
- C++之数据类型--整形&sizeof关键字
数据类型: C++规定在创建一个变量或者常量时,必须要指定出相应的数据类型,否则无法给变量分配内存 整型 **作用**:整型变量表示的是==整数类型==的数据 C++中能够表示整型的类型有以下几种方式 ...
- 23-Ubuntu-文件和目录命令-查看文件内容-more 和 cat
1. more---适合查看内容多的文件 格式: more 文件名 操作键 功能 空格键 显示手册页下一屏 Enter键 一次滚动手册页的一行 b 返回上一屏 f 前滚一屏 q 退出 例: more ...
- 18-MySQL-Ubuntu-数据表的查询-连接(七)
students与classes表,两个表的连接字段是students.cls_id=classes.ID (1) 左连接:left join on 左边表全取,右边表取共有的,没有的为null se ...
- mysql之MHA、Mycat综合分析
一.简介 MHA: 你可以把它看做是一个监控MySQL的工具,当master挂了之后,起一个slave作为master,另外一台slave重新作为新master的备库: 所以MHA的架构做好是三台数 ...