After I installed as little as possible
# uname -a
FreeBSD xxxxxx.ro 14.1-RELEASE-p5 FreeBSD 14.1-RELEASE-p5 GENERIC i386
I gave the order
# freebsd-update fetch install && reboot
and after that
# pkg install -y apache24 php84 mod_php84
and
# cd /usr/local/etc/apache24/Includes && touch php.conf && chown root:wheel php.conf && chmod 0644 php.conf && ee php.conf
in which I included
<FilesMatch "\.php$">
SetHandler application/x-httpd-php
</FilesMatch>
<FilesMatch "\.phps$">
SetHandler application/x-httpd-php-source
</FilesMatch>
I gave the order
# ee /usr/local/etc/apache24/httpd.conf
in which I modified
DirectoryIndex index.php index.html
Then I gave the order
# service apache24 onestart
And I received
Performing sanity check on apache24 configuration:
Segmentation fault (core dumped)
Starting apache24.
Segmentation fault (core dumped)
/usr/local/etc/rc.d/apache24: WARNING: failed to start apache24
I gave the orders
#sysrc apache24_enable=YES
# reboot
And I received
Oct 29 18:50:34 cjmt2 kernel: pid 7677 (httpd), jid 0, uid 0: exited on signal 11 (core dumped)
Oct 29 18:50:35 cjmt2 root[9257]: /etc/rc: WARNING: failed to start apache24
Oct 29 18:50:35 cjmt2 kernel: pid 8079 (httpd), jid 0, uid 0: exited on signal 11 (core dumped)
If I comment it should not be used
#LoadModule php_module libexec/apache24/libphp.so
and then order
# service apache24 start
I received
Syntax OK
Starting apache24.
Ok, it seems that mod_php doesn't work, well there is another way...
I gave the orders
# pkg delete mod_php84-8.4.0.r1 && rm -f /usr/local/etc/apache24/Includes/php.conf
# ee /usr/local/etc/apache24/httpd.conf
where I activated
LoadModule proxy_module libexec/apache24/mod_proxy.so
LoadModule proxy_fcgi_module libexec/apache24/mod_proxy_fcgi.so
I gave the order
# ee /usr/local/etc/php-fpm.d/www.conf
where I activated
listen = /var/run/php-fpm.sock
listen.owner = www
listen.group = www
listen.mode = 0660
then I gave the order
# ee /usr/local/etc/apache24/extra/httpd-ssl.conf
and I added at the end of the file httpd-ssl.conf
<FilesMatch \.php$>
SetHandler "proxy:unix:/var/run/php-fpm.sock|fcgi://localhost/"
</FilesMatch>
</VirtualHost>
I gave the orders
# sysrc php_fpm_enable=YES
# service apache24 reload
# echo '<?php phpinfo(); ?>' > /usr/local/www/apache24/data/info.php
then from windows I accessed the link
https://ip-local/info.php
I didn't find any errors, php-fpm works, but now in firefox I have a snow-white page and in edge the php code from the page, that's how I wrote it....
Thanks for any kind of help if the advice is not to give up FreeBSD.
# uname -a
FreeBSD xxxxxx.ro 14.1-RELEASE-p5 FreeBSD 14.1-RELEASE-p5 GENERIC i386
I gave the order
# freebsd-update fetch install && reboot
and after that
# pkg install -y apache24 php84 mod_php84
and
# cd /usr/local/etc/apache24/Includes && touch php.conf && chown root:wheel php.conf && chmod 0644 php.conf && ee php.conf
in which I included
<FilesMatch "\.php$">
SetHandler application/x-httpd-php
</FilesMatch>
<FilesMatch "\.phps$">
SetHandler application/x-httpd-php-source
</FilesMatch>
I gave the order
# ee /usr/local/etc/apache24/httpd.conf
in which I modified
DirectoryIndex index.php index.html
Then I gave the order
# service apache24 onestart
And I received
Performing sanity check on apache24 configuration:
Segmentation fault (core dumped)
Starting apache24.
Segmentation fault (core dumped)
/usr/local/etc/rc.d/apache24: WARNING: failed to start apache24
I gave the orders
#sysrc apache24_enable=YES
# reboot
And I received
Oct 29 18:50:34 cjmt2 kernel: pid 7677 (httpd), jid 0, uid 0: exited on signal 11 (core dumped)
Oct 29 18:50:35 cjmt2 root[9257]: /etc/rc: WARNING: failed to start apache24
Oct 29 18:50:35 cjmt2 kernel: pid 8079 (httpd), jid 0, uid 0: exited on signal 11 (core dumped)
If I comment it should not be used
#LoadModule php_module libexec/apache24/libphp.so
and then order
# service apache24 start
I received
Syntax OK
Starting apache24.
Ok, it seems that mod_php doesn't work, well there is another way...
I gave the orders
# pkg delete mod_php84-8.4.0.r1 && rm -f /usr/local/etc/apache24/Includes/php.conf
# ee /usr/local/etc/apache24/httpd.conf
where I activated
LoadModule proxy_module libexec/apache24/mod_proxy.so
LoadModule proxy_fcgi_module libexec/apache24/mod_proxy_fcgi.so
I gave the order
# ee /usr/local/etc/php-fpm.d/www.conf
where I activated
listen = /var/run/php-fpm.sock
listen.owner = www
listen.group = www
listen.mode = 0660
then I gave the order
# ee /usr/local/etc/apache24/extra/httpd-ssl.conf
and I added at the end of the file httpd-ssl.conf
<FilesMatch \.php$>
SetHandler "proxy:unix:/var/run/php-fpm.sock|fcgi://localhost/"
</FilesMatch>
</VirtualHost>
I gave the orders
# sysrc php_fpm_enable=YES
# service apache24 reload
# echo '<?php phpinfo(); ?>' > /usr/local/www/apache24/data/info.php
then from windows I accessed the link
https://ip-local/info.php
I didn't find any errors, php-fpm works, but now in firefox I have a snow-white page and in edge the php code from the page, that's how I wrote it....
Thanks for any kind of help if the advice is not to give up FreeBSD.