Skip to content

Instantly share code, notes, and snippets.

@chrisamoore
Created March 5, 2014 18:31
Show Gist options
  • Save chrisamoore/9373530 to your computer and use it in GitHub Desktop.
Save chrisamoore/9373530 to your computer and use it in GitHub Desktop.
Nginx Conf for laravel
server {
listen *:80;
server_name site.dev www.site.dev;
access_log /var/log/nginx/site.dev.access.log;
error_log /var/log/nginx/site.dev.error.log;
location / {
root /var/www/site/public;
try_files $uri $uri/ /index.php?$args ;
index index.php;
}
location ~ \.php$ {
root /var/www/site/public;
try_files $uri $uri/ /index.php?$args ;
index index.html index.htm index.php;
fastcgi_index index.php;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param APP_ENV dev;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
include fastcgi_params;
}
sendfile off;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment