Skip to content

Instantly share code, notes, and snippets.

@PHLAK
Last active December 25, 2015 19:19
Show Gist options
  • Save PHLAK/7026607 to your computer and use it in GitHub Desktop.
Save PHLAK/7026607 to your computer and use it in GitHub Desktop.
UberGallery Nginx server config example
server {
root /var/www/example;
server_name example.com www.example.com;
location / {
index index.php index.html index.htm;
try_files $uri $uri/ /index.php;
}
# Pass PHP scripts to FastCGI server listening on 127.0.0.1:9000
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
# NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fastcgi_params;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment