0

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?

pnuts
  • 58,317
  • 11
  • 87
  • 139

1 Answers1

0

I'm not sure since I am not an expert, but, as per the official documentation,

Nginx does not support CGI, so any applications or Virtualmin scripts that use CGI will not work. Virtualmin should prevent the installation of scripts that require CGI, mod_perl or Apache-specific features.

And when I try to preview a website, it redirects to:

https ://MYHOSTNAME:10000/virtual-server/link.cgi/MYHOSTNAME/http ://website

So it would be actually a broken feature when using nginx in virtualmin, I guess.