Skip to content

Instantly share code, notes, and snippets.

@zechtz
Created February 2, 2018 14:30
Show Gist options
  • Save zechtz/6cec31ef3771674ef34e9d9138760097 to your computer and use it in GitHub Desktop.
Save zechtz/6cec31ef3771674ef34e9d9138760097 to your computer and use it in GitHub Desktop.
Nginx Configuration with Laravel + PHP7.2 fpm
server {
listen 80;
listen [::]:80;
root /home/username/sites/laravelappdirectory/public;
index index.php index.htm index.nginx-debian.html;
server_name servername.test www.servername.test;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php7.2-fpm.sock;
}
location ~ /\.ht {
deny all;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment