Monday, April 28, 2014

(Auto) Configure your Web Server for Sitecore

In the past people used to install Sitecore manually extracting files from archive, setting up permissions according to the installation guide, etc. It sounds so wrong today, when we have PowerCore Deployment Framework, Sitecore Instance Manager, etc. But setting up website is not just about Sitecore deployment, if you look around, you'll see that you also need to configure the environment around it. And here's the simple way to do it.

The way configuration is usually managed is going to the Server Manager application, and enabling the stuff you need.

This works well until you realize that you need to configure 10 more servers, or after you've done some configuration manually, you receive all kinds of "can't reproduce" issues, caused by different setup of your dev / test / production environment. Missing "HTTP Redirect" checkbox at one of the Content Delivery servers (somewhere behind the load balancer) can make you really happy, or not....

Basically, all you need to do once you've got new VM is the following:

1) Grant permissions to the AppPool account2) Setup Windows features (how much of them do you need to get Sitecore up & running?)3) Install additional software. Yep, you should install ASP.net MVC for the latest version of Sitecore(and its modules) to work properly

Here's the sample PowerShell script which will do that for you:

Just run it as an administrator on clean OS, and in a minute you'll be able to deploy your website (and what is more important it will work).

Of course you might want to tweak some stuff a little, but I hope this gives you a nice example to start with. Enjoy!