listen 80;
server_name localhost;
#charset koi8-r;
access_log logs/host.access.log main;
location = / {
proxy_set_header Host $host;
proxy_set_header X-Real-Ip $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_pass http://127.0.0.1:8080;
}
location = /index.html {
root ainusers.com.bak;
index ainusers_ip.html index.html index.htm;
}
location /index.html {
root ainusers.com;
index ainusers_port.html index.html index.htm;
}
location /xxx {
if ( $remote_addr = '192.168.79.1' ) {
rewrite ^.*$ /ainusers_ip.html break;
}
root ainusers.com;
index ainusers_port.html index.html index.htm;
}
location /ainusers_ip.html {
if ( $remote_addr = '192.168.79.1' ) {
# rewrite ^.*$ /ainusers_port.html break;
rewrite /ainusers_ip.html /index.html break;
}
root ainusers.com;
index ainusers_port.html index.html index.htm;
}
location /ainusers_port.html {
proxy_pass http://127.0.0.1:80;
}
server_name localhost;
#charset koi8-r;
access_log logs/host.access.log main;
location = / {
proxy_set_header Host $host;
proxy_set_header X-Real-Ip $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_pass http://127.0.0.1:8080;
}
location = /index.html {
root ainusers.com.bak;
index ainusers_ip.html index.html index.htm;
}
location /index.html {
root ainusers.com;
index ainusers_port.html index.html index.htm;
}
location /xxx {
if ( $remote_addr = '192.168.79.1' ) {
rewrite ^.*$ /ainusers_ip.html break;
}
root ainusers.com;
index ainusers_port.html index.html index.htm;
}
location /ainusers_ip.html {
if ( $remote_addr = '192.168.79.1' ) {
# rewrite ^.*$ /ainusers_port.html break;
rewrite /ainusers_ip.html /index.html break;
}
root ainusers.com;
index ainusers_port.html index.html index.htm;
}
location /ainusers_port.html {
proxy_pass http://127.0.0.1:80;
}