# Thursday, July 17, 2008

How to Install dasBlog on a 1and1 Shared Server

After trying maybe 15 different blog applications for my 1and1 shared server, I found that dasBlog was the easiest to decipher and implement. It was a typical pain to set-up like applications are.  I also realized that ASP scripts were much easier to configure, but really is weak compared to ASP.NET. I want to learn the technology the best web sites use now.  I will say of every type of application I have tried, this had the features I wanted, and much more, and the code is organized well-enough, that I can use it as a tutor and I tweak it for my own tastes. 

Many ASP.NET applications need to adjust the server's registry, and with shared hosting, the host service won't let it.  Or the applications work fine, but the admin module is a separate application, and put in a sub-directory, another no-no. 1and1 only allows applications to be in a folder in the root directory or the root directory itself.  dasBlog works perfectly for what I wanted, a blog I have complete control of. Anyway, with 1and1, I would assume with a little patience, some of the steps here might help most 1and1 installation problems. I read every 1and1 shared server FAQ on scripting languages and ASP.NET 2.0 and came up with the following solution: 

Here are the steps:

I am assuming you've already downloaded, extracted it, uploaded dasBlog into a folder like "blog" or some other generic or "cute" word, and are banging your computer right about now.  Calm down, it takes a little bit of time.

If you are installing dasBlog in your root folder, only do steps 2, 3, and 5.

Step 1: (skip if you are installing in your root folder) Go to your domain manager on the admin.1and1.com console.  If you are going to put this in a sub-domain, that is, "blogname.yoursite.com" create the directory, then make its destination folder "/" the root folder. This will take an hour or so to approve, if you use Frontpage extensions, you need to upgrade your web software and it will take up to ten hours.

Step 2: Start the Webfiles application and click "application settings" on the file menu. Select "create" in the next window, and point to your dasBlog folder, or "/" if installing in your root directory.

Step 3: Copy the the contents of the "bin" folder into the root directory, if there isn't one, copy the entire folder. While you are waiting for that to finish, open notepad.

Step 4: (skip if you are installing in your root folder) You need a redirect script in your root directory to work with dasBlog in a sub-folder, copy and paste the following script, save it as "default.asp" and upload to your root directory. You can add all of the redirects for your different websites with this file, just copy the "if" section and change the links for the different sub-domains.

 

Code Snippet
<%@LANGUAGE="VBSCRIPT"hlight2 %>

<%ht0 EnableSessionState=False

host = Request.ServerVariables("HTTP_HOST")

if host = "blogname.yoursite.com" or host = "www.blogname.yoursite.com" then
response.redirect("http://yoursite.com/dasblog/default.aspx")
End if

else 
response.redirect("http://yoursite.com/index.html")

 

Step 5: Make sure you edit your site.config file with the full path and not the virtual path "/dasblog/" or whatever it is. I know this kind of defeats the purpose of using a sub-domain name in the first place, but it can be an easier link for people to remember, without saying "bestwebsitever.com, slash, foldername". I almost killed my cat figuring that part out.  I haven't checked, but I am sure if you have multiple domains, the path will have to resolve to your default root directory.

This worked for me, if I missed something, or if there is a way to configure it to work with the virtual directory instead of the full path, I would love to hear about it.