@ /etc/php/7.4/apache2/php.ini
@ /etc/php/7.4/fpm/php.ini
memory_limit = 256M
max_input_vars = 5000
max_execution_time = 300
max_input_time = 120
upload_max_filesize = 32M
post_max_size = 32M
display_errors = Off
xdebug.mode = off
opcache.enable = 1
opcache.enable_cli = 1
opcache.memory_consumption = 128
opcache.file_cache = /bin/php/cache
opcache.jit_buffer_size = 256M (PHP8)
opcache.jit = tracing (PHP8)
apt-get install php7.4-fpm
@ /etc/php/7.4/fpm/pool.d/www.conf
a2enmod proxy_fcgi setenvif
a2enconf php7.4-fpm
php-fpm7.4 -t
service php7.4-fpm restart
service apache2 restart
<VirtualHost *:80>
ServerAdmin webmaster@{domain}
ServerName {domain}
ServerAlias www.{domain}
DocumentRoot "/var/www/html/{domain}"
DirectoryIndex index.php
<Directory "/var/www/html/{domain}/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require all granted
</Directory>
<FilesMatch ".php$">
SetHandler "proxy:unix:/var/run/php/php7.4-fpm.sock|fcgi://localhost/"
</FilesMatch>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
server {
listen 80;
server_name {domain};
root /var/www/html/{domain};
access_log /var/log/nginx/{domain}-access.log;
error_log /var/log/nginx/{domain}-error.log error;
index index.html index.php;
location / {
try_files $uri $uri/ /index.php$is_args$args;
}
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php7.4-fpm.sock;
fastcgi_index index.php;
include fastcgi.conf;
}
}
- Jihad Sinnaour - Jakiboy (Initial work)
Please give it a Star if you like the project.