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;
}
}
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 基于Microsoft.Extensions.AI核心库实现RAG应用
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
· 开发者必知的日志记录最佳实践
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
· 震惊!C++程序真的从main开始吗?99%的程序员都答错了
· 【硬核科普】Trae如何「偷看」你的代码?零基础破解AI编程运行原理
· 单元测试从入门到精通
· 上周热点回顾(3.3-3.9)
· winform 绘制太阳,地球,月球 运作规律