Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
how to enable php-fpm with apache2 [slvd]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
cwc
Veteran
Veteran


Joined: 20 Mar 2006
Posts: 1440
Location: Tri-Cities, WA USA

PostPosted: Fri Apr 28, 2023 11:33 pm    Post subject: how to enable php-fpm with apache2 [slvd] Reply with quote

I have installed apache2 and php.
I did not enable apache2 with installing php so I know I have to emerge it again.
I'm doing this as in a /etc/portage/package.use/php.txt file with the following:
dev-lang/php apache2 fpm

With this installation I'd like to try php-fpm.

Code:

I also get this error:
rc-service php-fpm start
 * rc-service: service `php-fpm' does not exist




Please throw me a bone on how to enable apache2 with php (php-fpm)



I am trying to follow this guide:
https://wiki.gentoo.org/wiki/PHP

Thank You.
_________________
Without diversity there can be no evolution:)
Back to top
View user's profile Send private message
cwc
Veteran
Veteran


Joined: 20 Mar 2006
Posts: 1440
Location: Tri-Cities, WA USA

PostPosted: Sat Apr 29, 2023 12:43 am    Post subject: solved Reply with quote

Solved.
Apache2 with php-fpm is set up. <?php phpinfo();?> works.

Code:

* Add -D PHP to /etc/conf.d/apache2
/etc/conf.d/apache2 Enabling the PHP module
APACHE2_OPTS="... -D PHP"

*  add a php.txt file at  /etc/portage/package.use/  including the following
# more /etc/portage/package.use/php.txt
dev-lang/php apache2 fpm
>=app-eselect/eselect-php-0.9.8 apache2 fpm

*Install apache and php
emerge -va dev-lang/php
emerge -va www-servers/apache

* Select php-fpm
eselect php list fpm
  [1]   php8.1 *
 eselect php set fpm 1

* start/restart apache2
 /etc/init.d/apache2 restart
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum