Gallery3 + Nginx

This content 8 years old. Please, read this page keeping its age in mind along with the fact technology changes fast and the information on this page me be outdated, not best practice, or plain wrong.

I have Gallery3 working with Nginx. Here’s my setup and some configuration for   I no longer am using Gallery3 or nginx.  (7/21/2012)

  • Nginx 1.0.11
  • PHP 5.3.3-7
  • PHP5 GD Graphics Library
  • Gallery 3.0.2

Nginx virtual host configuration:

server {
    root /var/www/;
    include /etc/nginx/fastcgi_php;

    location / {
    fastcgi_index  index.php;
    fastcgi_split_path_info ^(.+.php)(.*)$;
    fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
    fastcgi_param  PATH_INFO        $fastcgi_path_info;
    include fastcgi_params;

        index index.php;
        if (-f $request_filename) {
                expires max;
        if (!-e $request_filename) {
                rewrite ^/(.+)$ /index.php?kohana_uri=$1 last;

I also had to modify Gallery3’s configuration (/application/config/config.php):

$config["index_page"] = "";

Much of the tips came from:

Speak Your Mind


This site uses Akismet to reduce spam. Learn how your comment data is processed.