Skip to content

Instantly share code, notes, and snippets.

@xianhuazhou
Created May 27, 2014 15:50
Show Gist options
  • Save xianhuazhou/4db1f5ef60f3fb631890 to your computer and use it in GitHub Desktop.
Save xianhuazhou/4db1f5ef60f3fb631890 to your computer and use it in GitHub Desktop.
show different pages for different Ips
server {
listen 8888;
server_name fw.dev 127.0.0.1;
root /var/www/html/fwdev;
error_page 403 http://www.example.com;
allow 127.0.0.1;
deny all;
location / {
index index.php index.html;
}
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment