Skip to content

Instantly share code, notes, and snippets.

@johndavedecano
Last active January 2, 2019 07:18
Show Gist options
  • Save johndavedecano/e3f99c4da88c6af6d680ad419d0899b7 to your computer and use it in GitHub Desktop.
Save johndavedecano/e3f99c4da88c6af6d680ad419d0899b7 to your computer and use it in GitHub Desktop.
PHP 7.2 Laravel Nginx Basic Configuration
server {
listen 80 default_server;
listen [::]:80 default_server;
root /home/ubuntu/project/public;
index index.php index.html;
server_name _;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/run/php/php7.2-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