Skip to content

Instantly share code, notes, and snippets.

@dennis-8
Created August 12, 2018 10:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dennis-8/90fa801856db980e54f2e411d05269d2 to your computer and use it in GitHub Desktop.
Save dennis-8/90fa801856db980e54f2e411d05269d2 to your computer and use it in GitHub Desktop.
NGINX Laravel Config
# config is located here: /etc/nginx/sites-available
# Default server configuration
#
server {
listen 80 default_server;
listen [::]:80 default_server;
root /var/www/app/public;
# Add index.php to the list if you are using PHP
index index.php index.html;
server_name _;
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