6

After reading this answer, I decided to change httpd's MPM on my server to worker. But while editing /etc/sysconfig/httpd, I noticed this comment:

# The default processing model (MPM) is the process-based
# 'prefork' model.  A thread-based model, 'worker', is also
# available, but does not work with some modules (such as PHP).
# The service must be stopped before changing this variable.
#
#HTTPD=/usr/sbin/httpd.worker

I may be interpreting it wrong, but isn't it telling me that worker will not work with mod_php? Because that is what I am currently using.

The server runs CentOS 6.4 and Apache 2.2.

  • You can't use mod_php with worker – ALex_hha Sep 3 '13 at 19:37
8

No - you can't - you'll have mysterious bugs and crashes as PHP isn't thread-safe.

But you can use worker-mpm for static files and something like php_fcgi or a reverse proxy to another httpd instance only for PHP.

I'm using the latter - it allows me to run multiple sites - all with different permissions and configs on CentOS 6.

| improve this answer | |
0

As far as I know, mod_php is not thread-safe.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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