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
Next 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 [2017/07/13 12:09] demiankatz
Line 42: Line 42:
     }     }
 } }
 +</code>
 +
 +If you want to serve vufind in diferent location (in my case "/explorador") using alias and rewrite instead of try_files  
 +
 +This //additional// example configuration was shared by Horacio Degiorgi.
 +
 +
 +<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 ----
 ---- ----
  
installation/nginx.txt · Last modified: 2023/11/28 20:37 by demiankatz