PHP
Installation
sudo dnf install php php-fpm php-zip nginx -y
sudo systemctl start php-fpm
curl -sS https://getcomposer.org/installer | php
sudo mv composer.phar /usr/local/bin/composer
composer -v
sudo mkdir /etc/nginx/sites-available
sudo vi /etc/nginx/sites-available/default
index index.php;
location ~ \.php$ {
fastcgi_pass unix:/run/php/php8.2-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
sudo nginx -t
sudo systemctl restart nginx
cd /usr/share/nginx/html
sudo su
echo "<?php phpinfo(); ?>" > info.php
curl localhost/info.php
related