[quote=“miltownkid”]Since people brought it up in the hosting thread I thought there should be a thread started on this. After 2 days reading this book:
“Setting Up LAMP” (link)
And having a second computer to play with I’ve done this:
Not really anything there now, but I was surprised at how easy it was to do. If the link doesn’t work it’s because I turned the computer off :P.
The Mepis CD pretty much did all the hard stuff for me. I used the built in program install tool to remove Apache2 and downgrade to 1.3 (because the book says it’s better for some reason).
Anyhow, it’s a lot easier to do than you probably think it is (and real easy if you already know ).
Edit: Oh yeah, if someone has some questions on what to do ask them here. I was going to write a “guide” but there’s far too many variables (Which Windows, *nix, Mac; dual booting; router issues; etc.) I think I’ll end up having questions too and I’ll putt’m here.[/quote]
Cool. I may dig up a copy of that book next time I’m in Taipei (down here in the Deep South of Taiwan the only English books available are English-Chinese dictionaries).
Be sure to pay careful attention to security issues if you’re running your own server. You do have a firewall, don’t you?
Below is an explanation I found about Apache 1 vs Apache 2:
Apache2 has a number of different modes it can work in. These modes are called MPM's. The default MPM is called Worker which is a multithreaded model. PHP, mod_perl, mod_python, and any other similar technology which links directly into the httpd processes will need to be perfectly threadsafe and reentrant to work effectively with a threaded Apache2 mpm. This is doable for the core of PHP, but there are literally hundreds of 3rd party libraries that can be linked into PHP and nobody whether or not these libraries are threadsafe. And figuring out if a specific library is threadsafe or not is non-trivial and it can very from one platform to another. And just to make it even harder, this stuff will appear to work fine until you put it under load or hit very specific race conditions which makes it nearly impossible to debug.
So, since we can't tell you for sure that a threaded Apache2 mpm + PHP will work we do not suggest you use it for a production server. And since we can't know for sure, none of the main PHP developers use this combination for our own servers which compounds the problem because it is not receiving anywhere near the amount of realworld testing required to work out all the little issues above and beyond this threading unknown.
There is an Apache2 mpm, called "prefork", which isn't threaded and basically makes Apache2 look like Apache1. But hey, we have a very good server already that looks like Apache1.
In the end I don't see Apache2+PHP ever becoming a production platform with the current architecture. The only way I see it ever working is to pull PHP out of Apache and use a fastcgi approach. Or, with time, perhaps we will learn how to make sure a library is perfectly threadsafe and safe to use in a multithreaded Apache2.
For now, I really see no reason not to simply use Apache1 if you want a robust, fast and stable web server.