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

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
installation:nginx [2015/12/08 19:26] – ↷ Page moved and renamed from vufind2:using_nginx_with_vufind to installation:nginx demiankatzinstallation:nginx [2023/11/28 20:36] demiankatz
Line 1: Line 1:
-====== Using Nginx with VuFind ======+====== Using Nginx with VuFind® ======
  
-You can serve VuFind using [[http://nginx.org/|Nginx]] as an alternative to [[http://httpd.apache.org/|Apache]].+You can serve VuFind® using [[http://nginx.org/|Nginx]] as an alternative to [[http://httpd.apache.org/|Apache]]. There is not currently an officially distributed Nginx configuration, but the examples below may help you get things working.
  
-This example configuration was shared by Sascha-Oliver Prolic.+===== Example 1 ===== 
 + 
 +// This example configuration was shared by Sascha-Oliver Prolic. //
  
 <code> <code>
Line 42: Line 44:
     }     }
 } }
 +</code>
 +
 +// This example configuration was shared by Horacio Degiorgi. //
 +
 +If you want to serve VuFind® in a different location (in this case, "/explorador") you can use alias and rewrite instead of try_files.
 +
 +<code>
 + location ~ /explorador/themes/([0-9a-zA-Z-_]*)/css/(.*)$ {
 +      default_type text/css;
 +      alias /usr/local/vufind/themes/$1/css/$2;
 +    }
 +
 +    location ~ /explorador/themes/([0-9a-zA-Z-_]*)/images/(.*)$ {
 +      alias /usr/local/vufind/themes/$1/images/$2;
 +    }
 +
 +    location ~ /explorador/themes/([0-9a-zA-Z-_]*)/js/(.*)$ {
 +      alias /usr/local/vufind/themes/$1/js/$2;
 +    }
 +
 +location /explorador/ {
 +    alias /usr/local/vufind/public/;
 +    index index.php;
 +    ## Check for file existing and if there, stop ##
 +    if (-f $request_filename) {
 +        break;
 +    }
 +
 +    ## Check for file existing and if there, stop ##
 +    if (-d $request_filename) {
 +        break;
 +    }
 +
 +    ## If we get here then there is no file or directory matching request_filename ##
 +    rewrite (.*) /explorador/index.php?$query_string;
 +
 +    location ~ \.php$ {
 +                fastcgi_intercept_errors on;
 +                fastcgi_param SCRIPT_FILENAME $request_filename;
 +#               fastcgi_param VUFIND_ENV development;
 +#               fastcgi_param APPLICATION_ENV development;
 +                fastcgi_param VUFIND_HOME /usr/local/vufind;
 +                fastcgi_param VUFIND_LOCAL_DIR /usr/local/vufind/local;
 +#               fastcgi_param VUFIND_LOCAL_MODULES your-module-name;
 +#               fastcgi_pass unix:/run/php/php7.0-fpm.sock;
 +                fastcgi_pass 127.0.0.1:9090;
 +                fastcgi_index index.php;
 +                include fastcgi_params;
 +    }
 +}
 +
 </code> </code>
 ---- struct data ---- ---- struct data ----
 +properties.Page Owner : 
 ---- ----
  
installation/nginx.txt · Last modified: 2023/11/28 20:37 by demiankatz