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 ...
随机推荐
- Noip 2012 day2t1 同余方程
Description 求关于x的同余方程ax ≡ 1 (mod b)的最小正整数解. Input 输入文件为mod.in. 输入只有一行,包含两个正整数 a, b,用一个空格隔开. Output 输 ...
- flutter 超出俩行点点点
Text( '${listItem["title"]}', overflow: TextOverflow.ellipsis, maxLines: 2, style: TextSty ...
- 牛客多校第十场 B Coffee Chicken 递归
题意: 给你一个“斐波那契”字符串数列,第n项由第n-1项和第n-2项拼接而成,输出某项的某位及其后10位. 题解: 递归求解即可. #include<bits/stdc++.h> usi ...
- 信息安全-技术-Web:cookie
ylbtech-信息安全-技术-Web:cookie Cookie,有时也用其复数形式 Cookies,指某些网站为了辨别用户身份.进行 session 跟踪而储存在用户本地终端上的数据(通常经过加密 ...
- CentOS部署软件and so on……
CentOS各版本系统下载 CentOS下载地址:http://archive.kernel.org/centos-vault/ CentOS安装python3.7.2: 1.安装依赖包 yum in ...
- 解决jqGrid中,当前页一直显示为0的问题
项目中,经常会见到使用 jqGrid 进行一些数据的列表展示,而且使用起来也比较方便.但是有时会遇到一些奇怪的问题,比如前几天我就遇到了在使用 jqGrid 时,当前页一直显示为 0 的问题.下图就是 ...
- Elasticsearch(Transport Client)常用操作
这里描述操作elasticsearch采用TransportClient这种方式,官方明确表示在ES 7.0版本中将弃用TransportClient客户端,且在8.0版本中完全移除它. 记录一些常用 ...
- Caused by: java.io.FileNotFoundException: class path resource [com/cxy/springboot/mapping/] cannot be resolved to URL because it does not exist
java.lang.IllegalStateException: Failed to load ApplicationContext at org.springframework.test.conte ...
- IDEA与Tomcat的相关配置说明
1.IDEA会为每个Tomcat部署的项目单独建立一份配置文件 查看控制台的log输出:Using CATAINA_BASE 2.工作空间项目和Tomcat部署的web项目 WEB-INF:内的资源不 ...
- stelller插件与background-attachment配合使用,制作滚动页面
stelller插件与background-attachment:fixed配合使用,制作滚动页面