13.06.2015 Views

Introduction to the Apache Web Server - ApacheCon

Introduction to the Apache Web Server - ApacheCon

Introduction to the Apache Web Server - ApacheCon

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

• Some modules, like mod php, don’t work very well in a threaded environment, and so you need <strong>to</strong> stick<br />

with prefork if you’re using php.<br />

• Of course, some modules just don’t work at all on 2.0 yet, and in that case you have <strong>to</strong> stick with 1.3<br />

perchild<br />

http://httpd.apache.org/docs-2.0/mod/perchild.html<br />

Parent<br />

process<br />

...<br />

Threaded child processes<br />

• Does not work yet<br />

• Multi-process, multi-threaded<br />

• Allows configuring things per child process<br />

In a nutshell, here’s what perchild does, and why it is cool:<br />

perchild lets you configure <strong>Apache</strong> per child. Hence <strong>the</strong> name. In o<strong>the</strong>r words, you can actually have a<br />

different configuration for each <strong>Apache</strong> child process.<br />

This allows you <strong>to</strong> run virtual hosts as a particular user (as opposed <strong>to</strong> just <strong>the</strong> cgi programs, like suexec lets<br />

you do). It lets you configure one vhost <strong>to</strong> run 10 threads, and ano<strong>the</strong>r <strong>to</strong> run 200 threads. To specifically<br />

assign a particular child process <strong>to</strong> a particular vhost. And so on. It is very cool. But we should probably<br />

quit talking about it, since it is largely imaginary, and likely <strong>to</strong> remain so for some time.<br />

win32<br />

Parent<br />

Threaded<br />

Child<br />

16

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!