I’ve been messing around with coding my own (very simple) website for the past few weeks. My goal was to write the HTML and CSS code myself, install my own web server, and host my own website at home.
I’ve been teaching myself basic HTML and CSS through several excellent free online guides, like this one at lifehacker. Through their lessons and a few others I was able to build my simple, acceptably attractive web site.
Next I needed a domain name so people could access the site without typing in my (always changing) IP address. For this I am using a free dynamic DNS service FreeDNS which has been working perfectly for me. My favorite thing about FreeDNS it that it doesn’t have any of the strings attached like dyndns or no-ip, it simply works. I am running a dydns client on my home router running DD-WRT that updates my DNS lisitng each time my IP address changes. I ended up using one of their free subdomains, pwnz.org.
I recently purchased a Raspberry Pi and decided to set up an apache2 web server on it to host my website. Apache2 definitely isnt the fastest out there, but I wanted to get some experience with the ubiquitous web server, plus my site is fairly simple.
The pi is running the official Raspian image, based on Debian Linux. Once installed, the system performed like any other Linux server configured over SSH. Setting up Apache was simple, I installed the packages using apt-get, configured the apache2.conf file with some extra security parameters, and placed my website in the
/var/www/ directory via SFTP. The web server is running as its own user, and it is jailed into its directory for extra security.
The last step was to allow access from the internet to my web server, which I accomplished using the port forwarding feature on my DD-WRT router.
For anyone interested in checking out my site, it will be (temporarily) accessible here. I’ll be monitoring the server logs for some hands on security testing!
If I have taken the site down, you check out a screenshot of the site below.