Monday, November 12, 2012

Working with DNS and lighttpd with multiple subdomains

So since recently I had the brilliant idea of buying a proper domain, I figured it was time I setup my website again but as I've been studying in school to setup multiple sites and subdomains I figured I'd learn to do the same with my http server of choice.

I'm not going to go through the details of how I installed lighttpd since in most distros it's in your default repos, but I will describe how I've set up several subdomains.

Currently my main domain redirects here but as I also wanted to have the site I coded 4 years ago, I wanted to make it a subdomain.
I started thinking I wanted something simple so I decided to make a subdomain called old.kaizokuden.org.

After reading up on how the config file of lighttpd (/etc/lighttpd/lighttpd.conf) works I found the winning entry is structured like this:

$HTTP["host"] == "files.website.com"{
server.document-root = "/path/to/files.website.com/http"
accesslog.filename = "/var/log/lighttpd/files.website.com/access.log"
}

Where "files.website.com" is the desired subdomains address, in my case the address was to be old.kaizokuden.org.

Server.document-root, is as you'd expect the folder in which the files of the subdomain are located ex. "files.website.com".

Accesslog.filename is the log file that logs who connects to the website and such things.

This by itself was ofcourse not enough as I dont have a dns server installed on my server, so I added a sub domain to my domain at the address of "old.kaizokuden.org".
After about an hour my new page had gone live and the two pages directed to my different folders.

Friday, October 5, 2012

Custom Windows 7 Installation.

I recently started a course at the YrkesHögskolan here in Falun and I have been learning quite a bit. Among other things I learned about answer files to automate a windows installation, I decided today to reinstall my desktop computer and use a custom made Windows 7 Installation image. After some reading I feel like I will have more success using a method other then the one outlined in my book tho and I wanted to document what I was doing. So first things first I downloaded a software called RT Seven Lite (which can be found here, http://www.rt7lite.com/) after a few rough attempts at installing and launching I got this window:
After my laptop was finally done copying over a Windows 7 ISO to my desktop I clicked browse and selected the ISO and the output folder for the CD to be extracted to. The extracting phase seemed to take forever, but when I saw the text change to Loading Image I knew there was progress! (note that this is a lot faster on the normal priority then the high..) Since I wanted to include the latest service pack I told it to use windows 7 ultimate and to slipstream it.
After it took quite some time to actually slipstream the SP1 install file into the image it once again began to extract the image and I was presented with:
And since I was gonna customize it as much as I could I pressed select all. First tab in the list was "Integration" which itself had 4 tabs. For my plan tho only the applications tab was of interest. I added a single installer I had made using and added the /silent switch so it would run in the background without any user interface and set the mode to automatic so I didnt need to do anything. (note the silent flag can differ depending on the installer you are using!)