I've just installed virtualmin on nginx (I wanted ISPconfig on nginx, but I didn't succeeded). OS is Centos 6.4. Since DNS didn't propagate I want to preview a website I've created, through Virtualmin->Services->Preview Website . First it worked, but after I've added the following lines on /etc/nginx/nginx.conf file it didn't worked anymore.
fastcgi_hide_header X-Powered-By;
# enforce NO www
if ($host ~* ^www\.(.*))
{
set $host_without_www $1;
rewrite ^/(.*)$ $scheme://$host_without_www/$1 permanent;
}
# unless the request is for a valid file, send to bootstrap
if (!-e $request_filename)
{
rewrite ^(.+)$ /index.php?q=$1 last;
}
The code above is need for making work permalinks on wordpress website. What is wrong?