#
# A virtual host using mix of IP-, name-, and port-based configuration
#
server {
   listen       80;
   server_name  sakura.niji-net.com;
   location / {
       root   /var/www/vhosts/sakura.niji-net.com;
       index  index.html index.htm index.php;
   }
   location ~ .php$ {
       root           /var/www/vhosts/sakura.niji-net.com;
       fastcgi_pass   127.0.0.1:9000;
       fastcgi_index  index.php;
       fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
       include        fastcgi_params;
   }
}
server {
   listen       80;
   server_name  www6004u.sakura.ne.jp;
#    location / {
       root   /var/www/vhosts/www6004u.sakura.ne.jp;
       index  index.html index.htm index.php;
       allow  202.215.229.102;
       deny   all;
#    }
   location /cake/ {
       #
       if (-f $request_filename) {
           break;
       }
       #
       if (!-f $request_filename) {
           rewrite ^/cake/(.+)$ /cake/index.php?url=$1 last;
           break;
       }
   }
   location ~ \.php$ {
       root           /var/www/vhosts/www6004u.sakura.ne.jp;
       fastcgi_pass   127.0.0.1:9000;
       fastcgi_index  index.php;
       fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
       include        fastcgi_params;
   }
}