upstream service_test {
server 127.0.0.1:8080;
}
server
{
listen 80;
server_name test.com;
index index.html index.php;
root /tmp/test.com;
error_page 404 http://test.com/404.html;
error_page 502 http://test.com/502.html;
error_page 500 http://test.com/500.html;
location ~* .(gif|jpg|jpeg|png|css|js|ico|txt|svg|woff|ttf|eot)$
{
rewrite ^(.*)$ /static$1 break;
root /tmp/test.com; #
expires 1d;
}
location ~* .(html|htm)$
{
rewrite ^(.*)$ /static$1 break;
roo /tmp/test.com; #
expires 900s;
}
location / {
proxy_pass http://service_test;
include /opt/conf/nginx/proxy.conf;
}
upstream service_test {
server 127.0.0.1:8080;
}
server
{
listen 80;
server_name test.com;
index index.html index.php;
root /tmp/test.com;
error_page 404 http://test.com/404.html;
error_page 502 http://test.com/502.html;
error_page 500 http://test.com/500.html;
location ~* .(gif|jpg|jpeg|png|css|js|ico|txt|svg|woff|ttf|eot)$
{
rewrite ^(.*)$ /static$1 break;
root /tmp/test.com; #
expires 1d;
}
location ~* .(html|htm)$
{
rewrite ^(.*)$ /static$1 break;
roo /tmp/test.com; #
expires 900s;
}
set $flag 0;
if ($request_uri ~* "^/fuck/w+.html$") {
set $flag "${flag}1";
}
if ($remote_addr !~* "192.168.0.50|192.168.0.51|192.168.0.56") {
set $flag "${flag}2";
}
if ($flag = "012") {
rewrite ^ /index.html permanent;
}
location / {
proxy_pass http://service_test;
include /opt/conf/nginx/proxy.conf;
}
location / {
if ($remote_addr !~* "192.168.0.50|192.168.0.51|192.168.0.56") {
rewrite ^ /index.html permanent;
}
proxy_pass http://service_test;
include /opt/conf/nginx/proxy.conf;
}
if ($remote_addr ~* "192.168.0.50|192.168.0.51|192.168.0.56") {
proxy_pass http://test.com/fuck;
}
if ($remote_addr ~* "192.168.0.50|192.168.0.51|192.168.0.56") {
proxy_pass http://test.com$request_uri;
}
if ($remote_addr ~* "192.168.0.50|192.168.0.51|192.168.0.56") {
proxy_pass http://test.com;
}
location /fund {
if ($remote_addr !~* "192.168.0.50|192.168.0.51|192.168.0.56") {
rewrite ^ /index.html permanent;
}
}
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有