Skip to content

Instantly share code, notes, and snippets.

@mtoigo
Last active August 29, 2015 14:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mtoigo/1b856abf8f9498f66182 to your computer and use it in GitHub Desktop.
Save mtoigo/1b856abf8f9498f66182 to your computer and use it in GitHub Desktop.
Testing
server {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;
root /var/www/project1/public;
index index.html index.php;
# Make site accessible from http://localhost/
server_name localhost;
location / {
try_files $uri $uri/ /index.php;
}
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
# NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
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