Try the beta version of the new SilverStripe documentation

For the next 2 weeks you can use the new documentation website and give us your feedback.


This document contains information for an outdated version (2.3) and may not be maintained any more.

If some of your projects still use this version, consider upgrading as soon as possible.


These instructions are also covered on the Nginx Wiki

The prerequisite is that you have already installed Nginx and you are able to run PHP files via the FastCGI-wrapper from Nginx.

Now you need to setup a virtual host in Nginx with the following configuration settings:

server {
        listen   80;
        root   /home/;
        index  index.html index.php;
        if (!-f $request_filename) {
                rewrite ^/(.*?)(\?|$)(.*)$ /sapphire/main.php?url=$1&$3 last;
        error_page  404  /sapphire/main.php;
        location ~ \.php$ {
                fastcgi_index  index.php;
                fastcgi_param  SCRIPT_FILENAME  /home/$fastcgi_script_name;
                include fastcgi_params;

The above configuration will setup a new virtual host with rewrite rules suited for SilverStripe. The location block at the bottom will pass all php scripts to the FastCGI-wrapper.

Now you can proceed with the SilverStripe installation normally.


Comment policy: Please use comments for tips and corrections about the described functionality.
Comments are moderated, we reserve the right to remove comments that are inappropriate or are no longer relevant. Use the Silverstripe Forum to ask questions.

blog comments powered by Disqus