Created
April 30, 2018 13:01
-
-
Save marcelomf/15e0d110d3f2b3681a049fac1e438fc6 to your computer and use it in GitHub Desktop.
nginx php lumen
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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