Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is it possible to use Apache+mod_php and nginx+php-fpm in same server? I know these two servers can NOT share same port, but is it possible to run two different PHP modules in one server?

I'm planning to use some website with Apache and some with nginx (for performance testing).

Both is installed via YUM.

share|improve this question
up vote 2 down vote accepted

If all you are asking is the possibility, then yes, each has it's own port/sock file that it's listening to so there's no conflict.

You can set nginx as main and make it proxy to apache whatever domains you want to proxy to apahce.

share|improve this answer
Thank you! I tested it today and it worked. – ComMania Jan 23 '14 at 4:58

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.