Forum Moderators: phranque
What I'd like to know is if there is a great deal of difference between Apache and IIS.
Would it be worth seeing if the company would be worth switching to a new server?
Is there a downside to using IIS?
Any suggestions?
Yes, IIS is very, very different from Apache. It does most of the same things, but you'll have to completely change your mindset. Linux/Apache/PHP is a whole different world than Windows/IIS/ASP or .net.
By now, IIS is a perfectly capable web server. Most on this forum would probably say Apache is better (and would be right), but I doubt you'll find any reasons that are compelling enough for a company that has standardized on IIS and Windows to switch. And if your company is using any of the MS technologies, or if someone else has to administer the server, they will be much happier with IIS.
Sorry to disappoint by not responding with the normal MS/Windows/IIS flame response from a Unix guy (I am a Unix guy), but business needs trump any technical advantages for the majority of applications, IMHO.
The site is due for a major overall. Since the site is due for a complete overall, I've been thinking about creating an alternate site with a nonsense domain name and changing the DNS for the real domain name to point to the new site once the site is up and running.
I've already discussed the possibility of using Apache with the hosting service and they have both IIS and Apache servers. In fact their preference is for Apache.
What I'm trying to avoid is setting myself up for possibly stumbling into a bear trap.
My information may be out of date now that .NET is the standard, but back when there was only ASP 3.0, if you wanted to do anything resembling Apache's mod_rewrite functionality in IIS you pretty much had to buy a third party tool (a hundred or so bucks) and install it into IIS. This means that you need the ability to install software on the server which usually either requires in-house hosting or a dedicated hosting solution.
Performance-wise, with PHP, there really is no measurable difference under most circumstances. I have created an IIS/PHP-based site that seems to serve pages and files *incredibly* fast. I also have a Sun-Solaris/PHP website load balanced across three $1-million servers running much simpler PHP code that does not seem as fast to end users. But it probably has over a thousand times the number of simultaneous users so...
I think that perceived speed is usually impacted much, much more by other factors such as the server's actual network bandwidth at the "weakest link" in the chain, the server's processor and memory bandwidth, speed of hard disk reads and writes, number of simultaneous requests, etc. All of those things (especially the last one) tend to outweigh any speed differences between the same code executing on PHP/IIS or PHP/Apache. I'm sure there are some exceptions under unique circumstances, but I have never found any.
My 2 cents are that unless you need .NET functionality for some specialized application, such as integrating a web application with other Microsoft products, then Apache is the world's best web server.
The load balancer can be software that is running on a load-balancing server (like a normal server/computer), or it can be a specialized piece of hardware with pre-installed software from a vendor such as Cisco, Sun, etc.
That's about as much as I know about them.
You need not worry about using a load balancing solution unless your single server is getting too bogged down trying to handle all the requests that are coming into it. The kinds of issues that load balancing addresses have to do mostly with processor and memory limitations. A load balanced setup can also streamline maintenance tasks because you can potentially take one of the servers off-line to perform server software updates, reboot, etc. while the other web server(s) continue to handle all the web traffic. Simply put, you can just tell the load balancer not to send any requests to "server#1" and then you can do whatever needs to be done to server#1, unbeknownst to end users.
The complications with having more than one web server are not to be underestimated though. There need to be policies in place for assuring that all instances of the web site are absolutely identical. Also, having multiple instances of the website almost always requires the use of a dedicated database server that is a separate machine from your web servers. That way, there is only one instance of your database being used by all the website instances. The problems with having multiple database instances are pretty obvious.
SSI means using a "server-side include". It basically just means you are slurping the code of one file into another file at "runtime" (when a file is requested). It doesn't really have anything to do with load balancing.
There are multiple ways to do server-side includes. One of the easiest is with the PHP "include" handler. For example, if you had a file in your website named "foo.php", and inside that file you had the following PHP code:
<?php include("bar.php");?>
...hope that helps.
Your explanation of load balancing was helpful.
I've been using SSI with Apache, but have been wondering about the references I've seen about setting up .htaccess for SSI. I'm familiar with using .htaccess for mod_rewrite and the like, but have wondered why .htaccess has to be set up for SSI. What I think the purpose is so SSI can be on HTML pages that are not normally set up for dynamic coding--like PHP. Or is it something else?
Normally turning on or off Apache's ability to parse SSI statements is done in the http.conf file, or in a virtualhost directive.
But as you know, using a .htaccess file allows you to override whatever setting is made in the httpd.conf file.
I think that's all people are talking about in reference to SSI's and the .htaccess file.