# Fastcgi and APC

**URL:** <https://www.ruby-forum.com/t/fastcgi-and-apc/131238>\
**Category:** NGINX\
**Created:** [March 7, 2008, 6:00am UTC](https://www.ruby-forum.com/t/fastcgi-and-apc/131238 "2008-03-07T06:00:52Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ian\_MSEvans](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/7bcc69/32.png) [@Ian\_MSEvans](https://www.ruby-forum.com/u/Ian_MSEvans)\
**Post date:** [March 7, 2008, 6:00am UTC](https://www.ruby-forum.com/t/fastcgi-and-apc/131238/1 "2008-03-07T06:00:52Z")

</div>

I’m thinking of dropping my Apache backend (nginx currently handles the  
static stuff) and dipping my toes into running php via fastcgi.

1. Is there any change that needs to be made to the APC code cache  
settings? I thought I read something about there needing to be a change,  
but my Google searches aren’t turning anything up…

2. Any big surprises or PHP coding changes I need to be aware of if I  
run PHP via fastcgi?

Thanks to all.

---

<div class="post-metadata">

**Author:** ![Ian\_MSEvans](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/7bcc69/32.png) [@Ian\_MSEvans](https://www.ruby-forum.com/u/Ian_MSEvans)\
**Post date:** [March 7, 2008, 11:06am UTC](https://www.ruby-forum.com/t/fastcgi-and-apc/131238/2 "2008-03-07T11:06:38Z")

</div>

We use php-cgi in FCGI server mode with APC and nginx very happily. We  
haven’t needed to change anything in the APC config in order to get it  
to work with php-cgi, though of course production settings vary  
depending on what you want to do.

Igor

---

<div class="post-metadata">

**Author:** ![Ian\_MSEvans](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/7bcc69/32.png) [@Ian\_MSEvans](https://www.ruby-forum.com/u/Ian_MSEvans)\
**Post date:** [March 7, 2008, 9:15am UTC](https://www.ruby-forum.com/t/fastcgi-and-apc/131238/3 "2008-03-07T09:15:11Z")

</div>

The is nothing specific to the PHP configuration when PHP is run as  
fastcgi. You just need to configure nginx correctly and send the right  
fastcgi\_param’s and you are all set. I am already running several  
servers with just nginx and PHP as a fastcgi and everything is running  
just great. Tell me if you want to see my configuration, etc.

Kiril

---

<div class="post-metadata">

**Author:** ![Ian\_MSEvans](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/7bcc69/32.png) [@Ian\_MSEvans](https://www.ruby-forum.com/u/Ian_MSEvans)\
**Post date:** [March 7, 2008, 7:24pm UTC](https://www.ruby-forum.com/t/fastcgi-and-apc/131238/4 "2008-03-07T19:24:10Z")

</div>

On Fri, March 7, 2008 3:03 am, Kiril A. wrote:

> The is nothing specific to the PHP configuration when PHP is run as  
> fastcgi. You just need to configure nginx correctly and send the right

How about APC? Is the config the same or are there changes for running  
the  
opcode cache under fastcgi?

Thanks.

---

<div class="post-metadata">

**Author:** ![Ian\_MSEvans](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/7bcc69/32.png) [@Ian\_MSEvans](https://www.ruby-forum.com/u/Ian_MSEvans)\
**Post date:** [March 7, 2008, 7:22pm UTC](https://www.ruby-forum.com/t/fastcgi-and-apc/131238/5 "2008-03-07T19:22:25Z")

</div>

On Fri, March 7, 2008 4:55 am, Igor C. wrote:

> We use php-cgi in FCGI server mode with APC and nginx very happily. We  
> haven’t needed to change anything in the APC config in order to get it

It always happens…your email came in just as I hit send on a reply  
asking for clarification re: APC. 🙂

Thanks for the info.
