About Features Downloads Getting Started Documentation Events Support GitHub

Love VuFind®? Consider becoming a financial supporter. Your support helps build a better VuFind®!

Site Tools


Warning: This page has not been updated in over over a year and may be outdated or deprecated.
installation:nginx

This is an old revision of the document!


Using Nginx with VuFind

You can serve VuFind using Nginx as an alternative to Apache.

This example configuration was shared by Sascha-Oliver Prolic.

server {

    listen 80;
    root /path/to/vufind2/public;
    index index.html index.htm index.php;

    server_name your-server-name;

    location / {
        try_files $uri $uri/ /index.php$is_args$args;
      }

    location ~ ^/themes/([0-9a-zA-Z-_]*)/css/(.*)$ {
      default_type text/css;
      alias /path/to/vufind2/themes/$1/css/$2;
    }

    location ~ ^/themes/([0-9a-zA-Z-_]*)/images/(.*)$ {
      alias /path/to/vufind2/themes/$1/images/$2;
    }

    location ~ ^/themes/([0-9a-zA-Z-_]*)/js/(.*)$ {
      alias /path/to/vufind2/themes/$1/js/$2;
    }

    location ~ \.php$ {
                fastcgi_param VUFIND_ENV development;
                fastcgi_param APPLICATION_ENV development;
                fastcgi_param VUFIND_HOME /path/to/vufind2;
                fastcgi_param VUFIND_LOCAL_DIR /path/to/vufind2/local;
                fastcgi_param VUFIND_LOCAL_MODULES your-module-name;
                fastcgi_pass 127.0.0.1:9000;
                fastcgi_index index.php;
                include fastcgi_params;
    }
}
installation/nginx.1449602785.txt.gz · Last modified: 2015/12/08 19:26 by demiankatz