Skip to content

Instantly share code, notes, and snippets.

@crushcafeteria
Created June 29, 2017 08:16
Show Gist options
  • Select an option

  • Save crushcafeteria/3bcf0afa8f6e6042ef491643d9c93ba5 to your computer and use it in GitHub Desktop.

Select an option

Save crushcafeteria/3bcf0afa8f6e6042ef491643d9c93ba5 to your computer and use it in GitHub Desktop.
Sample Nginx Laravel Server Block
server {
listen 80 default_server;
root /var/www/laravel/public;
index index.php index.html index.htm;
server_name _;
location / {
try_files $uri $uri/ /index.php$is_args$args;
}
location ~ \.php$ {
try_files $uri /index.php = 404;
fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment