Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Sat May 12, 2012 3:00 pm 
Offline
Senior Newbie

Joined: Sat May 12, 2012 2:53 pm
Posts: 5
I went ahead and installed:

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 : http://alexcabal.com/installing-apache- ... -maverick/

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.


Top
   
 Post subject:
PostPosted: Sat May 12, 2012 4:24 pm 
Offline
Senior Member

Joined: Mon Aug 31, 2009 2:33 pm
Posts: 78
Location: The OC
That's pretty much how I've been doing it on 10.04 for the last 10 months or so. Although, I have a few vhosts that have their own php-fpm processes (running under different users).


Top
   
 Post subject:
PostPosted: Sat May 12, 2012 5:32 pm 
Offline
Senior Newbie

Joined: Sat May 12, 2012 2:53 pm
Posts: 5
Ok, that makes sense.

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.


Top
   
 Post subject:
PostPosted: Sun May 13, 2012 5:55 am 
Offline
Senior Member

Joined: Fri Feb 17, 2012 8:20 pm
Posts: 365
How exactly does this work? I have a few different domains/vhosts and when trying this out it worked fine for me, however I only had to add the Fcgi part to one vhost. I now have this in a single vhost:

Code:
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/


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?


Top
   
 Post subject:
PostPosted: Sun May 13, 2012 2:48 pm 
Offline
Senior Newbie

Joined: Sat May 12, 2012 2:53 pm
Posts: 5
I'm not really sure myself. I had it set at first to /var/ instead of /srv/, and my sites were working fine. I put it in my main apache2.conf instead of in each ghost's file, since I figured if the main file pointed at the right area (www), then I'd be alright. But, I've seen it referred to as a fake CGI call.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 3 guests


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

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group