Skip to content

Instantly share code, notes, and snippets.

@marcelomf
Created April 30, 2018 13:01
Show Gist options
  • Save marcelomf/15e0d110d3f2b3681a049fac1e438fc6 to your computer and use it in GitHub Desktop.
Save marcelomf/15e0d110d3f2b3681a049fac1e438fc6 to your computer and use it in GitHub Desktop.
nginx php lumen
server {
listen 80 default_server;
listen [::]:80 default_server;
root /home/marcelo/projetos/restful-orm/lumen/public;
index index.php index.html index.htm index.nginx-debian.html;
server_name lumen.teste;
location ~ \.php$ {
include snippets/fastcgi-php.conf;
# change in /etc/php/7.2/fpm/pool.d/www.conf -> listen = 127.0.0.1:9000
fastcgi_pass 127.0.0.1:9000;
#fastcgi_pass unix:/run/php/php7.2-fpm.sock;
}
location ~ /\.ht {
deny all;
}
location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
try_files $uri $uri/ /index.php?$query_string;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment