Apache httpd : Use PHP Scripts2024/11/08 |
Configure httpd to use PHP scripts. |
|
[1] | Install PHP. |
[root@www ~]# dnf -y install php php-mbstring php-pear
|
[2] |
After installing PHP, Restart httpd, it's OK to do it only.
[mod_php] has been Deprecated and PHP-FPM (FPM : FastCGI Process Manager) is configured by default.When [httpd] starts, [php-fpm] also starts for dependency by setting file [/usr/lib/systemd/system/httpd.service.d/php-fpm.conf]. |
[root@www ~]# systemctl restart httpd [root@www ~]# systemctl status php-fpm ● php-fpm.service - The PHP FastCGI Process Manager Loaded: loaded (/usr/lib/systemd/system/php-fpm.service; disabled; preset:> Drop-In: /usr/lib/systemd/system/service.d +-- 10-timeout-abort.conf Active: active (running) since Fri 2024-11-08 09:01:46 JST; 5s ago Invocation: b3bf0664defd44a2aab3e1573deedb49 Main PID: 3514 (php-fpm) Status: "Ready to handle connections" Tasks: 6 (limit: 4645) Memory: 12.2M (peak: 12.4M) CPU: 35ms CGroup: /system.slice/php-fpm.service ..... ..... # create PHPInfo test page [root@www ~]# echo '<?php phpinfo(); ?>' > /var/www/html/info.php |
[3] | Verify to access to PHPInfo test page from any client computer. |
Sponsored Link |