Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Thu Jun 13, 2013 8:13 am 
Offline
Senior Member

Joined: Thu Jun 13, 2013 7:32 am
Posts: 79
Hello, I have several sites on one linode running nginx, mysql, php-fmp, apc. This linode if for some personal sites and sites under development. I have apc installed and working, but it is working for every site. I need to have it work on selective sites so my sites in development are not cached.

I've searched around but can't find any answers on how to make this change.

Each site/domain is run as a different user so I have a pool for each site.

Any insight would be appreciated. Any more info, please let me know. Thanks


Top
   
PostPosted: Thu Jun 13, 2013 10:14 am 
Offline
Senior Member

Joined: Sat Nov 27, 2010 8:21 pm
Posts: 63
Set

Code:
apc.cache_by_default = off


in your main php.ini (or /etc/php.d/apc.ini if you use that) and

Code:
php_flag[apc.cache_by_default] = on


in the conf files for the pools you want to use it with.


Top
   
PostPosted: Thu Jun 13, 2013 7:59 pm 
Offline
Senior Member

Joined: Thu Jun 13, 2013 7:32 am
Posts: 79
Heres what I have:

Main php.ini: /etc/php5/fpm/php.ini, should have
"apc.cache_by_default = off"

Each site has:
/etc/php5/fpm/pool.d/mydomain.conf, and I should add
"php_flag[apc.cache_by_default] = on" in each I want to use APC.

Anything need to be done with /etc/php5/mods-available/apc.ini


Top
   
PostPosted: Thu Jun 13, 2013 8:28 pm 
Offline
Senior Member

Joined: Thu Jun 13, 2013 7:32 am
Posts: 79
Main php.ini: /etc/php5/fpm/php.ini, tried
"apc.cache_by_default = off"

After adding this and restarting php, the apc.php page still shows apc.cache_by_default = 1.
---------------------------------

Tried also puttinv apc.cache_by_default = 1 in /etc/php5/mods-available/apc.ini, restarted and same thing, apc.php and info.php still says it is on by default.


Top
   
PostPosted: Thu Jun 13, 2013 8:42 pm 
Offline
Senior Member

Joined: Thu Jun 13, 2013 7:32 am
Posts: 79
Quick status update. Info on apc.php in site with it enabled shows apc.cache_by_default = 1 and on one with it turned off says apc.cache_by_default = 0, so it appears to be working now. Thanks for the help.


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


Who is online

Users browsing this forum: No registered users and 4 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