Created
May 12, 2019 07:50
-
-
Save kdes70/972094a8da8ed97f97b15093c45f90b3 to your computer and use it in GitHub Desktop.
Nginx simple Laravel
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; | |
# корневая директория | |
root /var/www/d-dev.pro/public; | |
# порядок индексов | |
index index.php index.html index.htm; | |
#имя сервера: | |
server_name d-dev.pro www.d-dev.pro; | |
#логи | |
access_log /var/log/nginx/d-dev.access.log; | |
error_log /var/log/nginx/d-dev.error.log; | |
charset utf-8; | |
location / { | |
try_files $uri $uri/ /index.php?$query_string; | |
} | |
location ~ \.php\$ { | |
try_files $uri =404; | |
fastcgi_split_path_info ^(.+\.php)(/.+)\$; | |
fastcgi_pass unix:/var/run/php/php7.2-fpm.sock; | |
fastcgi_index index.php; | |
fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name; | |
include fastcgi_params; | |
} | |
location ~ /\. { | |
deny all; | |
} | |
include snippets/phpmyadmin.conf; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment