http://devkardia.com/easyblog/virtualmin-apache-and-nginx-reverse-proxy.html
Ja jāšķiro pēc ip adresēm tad – $remote_addr
http {
split_clients $echo_request_uri $c_host {
50% c1;
50% c2;
}
server {
location /data/ {
error_page 404 = /data/$c1.html;
error_page 403 = /data/$c1.html;
}
location ~* \.(txt|xml)${
add_header Access-Control-Allow-Origin *;
}
Ievieto iekš konkrētā server{}
location /home/domain1/ {
error_page 404 = /home/domain/error1.html;
error_page 403 = /home/picture.jpg;
}
nginx -V | grep --color -o http_stub_status
location /nginx_status {
# Turn on nginx stats
stub_status on;
# I do not need logs for stats
access_log off;
# Security: Only allow access from 192.168.1.100 IP #
allow 192.168.1.100;
# Send rest of the world to /dev/null #
deny all;
}