Wanting to make sure I'm doing apache2 + php5-fpm correctly
apache2
php5-fpm
php5-suhosin
php5-gd
php5-mysql
mysql-server (going to be replacing with mariadb-server soon)
I then set up apache and added the following to the bottom of my apache2.conf:
FastCgiExternalServer /srv/www/php5.external -host 127.0.0.1:9000
AddHandler php5-fcgi .php
Action php5-fcgi /usr/lib/cgi-bin/php5.external
Alias /usr/lib/cgi-bin/ /srv/www/
which I got from a guide at :
Currently, my server is running Drupal 7 just fine, and reporting the FPM module of php, with my web files located in /srv/www/sitename/public_html
Does the above configuration seem correct? And, I was wondering if folks had any good references for tuning php5-fpm with apache2 and Drupal.
4 Replies
What I'm currently looking at now is my worker configuration. I'm trying to find some resources for tuning it for a 512 linode. Currently, I've got php to 96mb, I've got apc at 128mb (not sure how that'll work), and I 've got the worker at default. Not sure how to tweak that.
FastCgiExternalServer /srv/www/<domain>/public_html/php5.external -host 127.0.0.1:9000
AddHandler php5-fcgi .php
Action php5-fcgi /usr/lib/cgi-bin/php5.external
Alias /usr/lib/cgi-bin/ /srv/www/<domain>/public_html/</domain></domain>
This made it work perfectly, so I'm happy with that. I thought however that I had to add something like this to every vhost with their respective domains. However I only added this to one vhost, and now it works automatically for every vhost/domain without having to add something to their vhost configuration.
Is this OK?