Best Web Server? (Apache, IIS, Tomcat etc)?
Hi
I’m learning to build an e-commerce style web site based on PHP and MySQL.
I wanted some opinions (and facts) about the best web server to use in this case? in terms of security, reliability, performance, flexibility and any other advantages/disadvantages which may apply.
Thanks for your answers
3 Responses to “Best Web Server? (Apache, IIS, Tomcat etc)?”


Apache. We have an IIS server here at work and I hate everything about it. I run Apache on my personal servers and its excellent in every way. IIS is probably easier to learn though… and I haven’t used Tomcat. Apache is just so versatile and its also free. You have total control over everything with a simple interface and can be run on most platforms, unlike IIS wish forces you to have Windows Server edition installed.
Report this comment
For something to run PHP with MySQL. I’d recommend Apache. IIS can do it too, but Apache fits in better. Should you run into problems, you’ll find far more people in the Apache/PHP community than a IIS/PHP community.
Pretty much all ISPs that provide PHP support do so in a LAMP (Linux, Apache, MySQL, PHP) set up. Besides, it’s very easy to set up Apache with PHP.
Tomcat can be a generic Webserver, but isn’t really meant to be. Not in a production environement anyway. It is primarily a JSP/Servlet engine that can also act as a web server. Most people use it in conjunction with Apache, just like you want to use PHP with Apache.
Both, Apache and IIS are reliable. As for performance, the differences here would be only academic. Also, if all you want to do is serve php docs, then I’m not sure what you’d be looking for in terms of flexibility.
Both are good servers, many of the differences are subjective. But the main one is for IIS you do need windows, and it is more resource hungry than Apache. It has also been quite insecure in the past, but they seem to have gotten their act together now.
Personally, I prefer Apache, but mainly because I’m used to it.
Report this comment
By definition, if you want PHP and MySQL, you’ll probably want apache.
By far the easiest way to get started is to use a server that already has this software installed (http://freehostia.com is free and pretty good)
If you want to install a test server, use XAMPP (http://apachefriends.org)
This free package includes apache, PHP, MySQL, phpMyAdmin, Mercury Mail, and other good tools. Best of all, everything is pre-configured to work together. Getting all these pieces talking correctly by hand can be messy.
You only need tomcat if you’re going to use Java on the server (and it’s an extension of apache anyway) IIS is necessary if you’re using ASP.NET, but if you’re using open source development tools, avoid the headaches of IIS.
Check out my videos at http://wally.cs.iupui.edu/n342/ I also have working copies of all files there. Watch this summer for the 3rd edition of my PHP / MySQL book. . .
PHP5 / MySQL Programming for the Absolute Beginner (author)
Report this comment