Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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