server {
listen 80;
client_max_body_size 50M;
server_name blog.mydomain.com; #this is your name of the domain you want to respond
access_log /var/log/nginx.vhost.access.log main;
root /var/www/blog.mydomain.com;
index index.html index.htm index.php;
if (!-e $request_filename) {
rewrite ^(.*)$ /index.php?q=$1 last;
break;
}
if (-f $document_root/system/maintenance.html) {
rewrite ^(.*)$ /system/maintenance.html last;
break;
}
location ~ \.php$ {
fastcgi_pass 127.0.0.1:8888;
fastcgi_index index.php;
fastcgi_param
SCRIPT_FILENAME /var/www/blog.mydomain.com$fastcgi_script_name;
include /usr/local/nginx/conf/fastcgi.conf;
}
error_page 500 502 503 504 /500.html;
location = /500.html {
root /var/www/blog.mydomain.com;
}
}