Last active
June 12, 2021 05:33
-
-
Save Ichinya/974a20e06fc3ec74845dc2ba4d95e46d to your computer and use it in GitHub Desktop.
настройка php8.0 под laravel 8.5
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; | |
listen [::]:80; | |
server_name laravel.local; | |
root /var/www/laravel/public; | |
index index.php index.html index.htm; | |
client_max_body_size 64m; | |
location / { | |
try_files $uri $uri/ index.php$is_args$args; | |
} | |
location ~* /storage/.*\.(php|php3|php4|php5|php6|phtml|pl|asp|cgi|dll|exe|shtm|shtml|fcg|fcgi|fpl|asmx|pht|py|psp|rb|var)$ { | |
types { | |
text/plain text/plain php php3 php4 php5 php6 phtml pl asp aspx cgi dll exe ico shtml shtm fcg fcgi fpl asmx pht py psp rb var; | |
} | |
} | |
location ~ \.php$ { | |
try_files $uri /index.php =404; | |
fastcgi_pass unix:/run/php/php8.0-fpm.sock; | |
fastcgi_index index.php; | |
fastcgi_buffers 16 16k; | |
fastcgi_buffer_size 32k; | |
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
include fastcgi_params; | |
} | |
location ~ /\.ht {deny all;} | |
location ~ /\.svn {deny all;} | |
location ~ /\.git {deny all;} | |
} |
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
[www] | |
user = www-data | |
group = www-data | |
listen = /run/php/php8.0-fpm.sock | |
listen.owner = www-data | |
listen.group = www-data | |
pm = dynamic | |
pm.max_children = 5 | |
pm.start_servers = 2 | |
pm.min_spare_servers = 1 | |
pm.max_spare_servers = 3 | |
catch_workers_output = yes | |
access.format = "%R %{seconds}d %{HTTP_HOST}e [%t] "%m %r%Q%q" %s %l %C %{kilobytes}M" | |
access.log = /var/log/php/$pool.access.log | |
slowlog = /var/log/php/$pool.log.slow | |
chdir = /var/www | |
php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f noreply@noserver.ru | |
php_flag[display_errors] = off | |
php_admin_value[error_log] = /var/log/php/$pool.error.log | |
php_admin_flag[log_errors] = on | |
php_admin_value[memory_limit] = 128M | |
php_admin_value[upload_max_filesize] = 20M | |
php_admin_value[post_max_size] = 20M |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment