location /piwigo/ { root /data/daemons/piwigo/; index index.php; location ~ /.*\.php$ { try_files $uri =404; fastcgi_split_path_info ^(.+\.php)(/.+)$; include fastcgi_params; fastcgi_param SCRIPT_FILENAME $request_filename; fastcgi_pass 127.0.0.1:9002; fastcgi_read_timeout 300; } }