How to setup your own photo serving web server at home.

Apache Web Server      People love to share photos with all the online services out there that let you upload photos. But most of them have restrictions in place like the number of photos or the size & quality of the photos. Not to mention the pain it is uploading to such sites. Enter Picasa (by google) and much of your organizing and uploading of photos is simplified. But that still leaves not wanting to deal with the online album services. Plus setting up your own site gives you geek points not to mention the ability to host almost any content. Another truth in today's world is most of us have an always connected internet connection at home and we pretty much end up leaving a computer or two on most of the time.Combine all this and the case for setting up your own website and web albums is made. So without much ado lets delve into how somebody can go around doing that.

     The idea here is to spend as little money as possible and to make do with what you have. Although you can make do with spending absolutely nothing at all by using some of the redirection services. It is advisible to spend a very small amount on getting your own doman name. For keeping this writeup simple I am going to not delve into the choices of service providers out there for each task. (you can do your own research and comparison).

Part 1 : The setup

     This is the part where we setup the things at home. It is a rather simple thing to do which involves setting up your own webserver & making sure it is accessible from the outside world. For the webserver (if you are on windows) you can go with IIS that comes with windows. This should be fine for most people. Make sure IIS is installed on your system. For this go to Control Panel -> add remove programs and click on add or remove windows components. Look for Internet Information Services and make sure it has a check mark agains it. You may also want to select it and click on the details button to see which services are installed. The default installation should work for most people. (Common Files, Documentation, Internet Information Services Snap-In, World Wide Web Server) After installation of IIS you should have a folder C:\Inetpub\wwwroot thats your folder where you store your web content. Put a test html page in there and name it 'index.html' fire up your browser and point it to 'localhost' or '127.0.0.1' and you should see your test page.

     If you are on Linux you can work with Apache web server. (Read the relevant howto :))
The next part is making sure your shiny new webserver is accessible from the Interweb. For which you need to make sure the firewalls you have on your PC and/or on your broadband router has a way of letting in the relevant traffic. This is called an excepton in firewall terms. I am going to assume you have the windows firewall enabled and you also have a firewall on your router. First lets punch a hole in the windows firewall, Click on control panel -> network Connectinos -> Change windows firewall settings (on the left panel). On the exceptions tab click on the 'Add port' button. On the dialogue box that pops up enter HTTP & 80 into the text boxes and click ok.

     Now for the part of your router. Enter the router's management interface (usually its an address like 192.168.0.1) after logging in as admin find the firewall section and add an exception there too for port 80. Next find a section named "virtual servers" or something to that effect. In it add your http server and the (internal) Ip address as the destination. (this is to route the port 80 traffic to your computer) Alright we are all set. Now find out the IP address given to you by your ISP. ( go to http://www.whatismyip.com/) and it should show you the IP address. Write this down on a piece of paper and go either to a friends place or your workplace or somewhere like that and enter the IP address into a browser. If everything went well you should see your test page pop up. Congratulations you have successfully completed Part 1.

Part 2 : Making it accessible.

     This is the part where we get a domain name and make it so that it points to our home computer so that everone and their cat can reach it easily.

     First we go and get ourselves a domain name. If you are not choosy about what exactly it is you can get away with spending as little as 1$ a year on a domain name. The Onlnie registrar godaddy.com will give you a .info domain name for that amount. If you must have something fancier then the price will obviously go up. Go ahead and give a few of yuor choices a try and find one that you want and register it. (its like buying anything else online). Make sure you only pay for the domain name and not for any other service like a nameserver or hosting (we are doing that ourselves). Find the my domains page and click on the name of the domain you just registered. That should bring you to the management page. Look for a Nameservers link and click it. Enter NS1.DNSEXIT.COM & NS2.DNSEXIT.com as your name servers (we will come to it in a big). Save and log off.

      After you have registered the domain name and got an account to manage it online we are still not fully there yet. Next we must make sure that when people type that domain name into their browser they reach your home PC. For which we must enlist the services of a DNS server. I would suggest dnxexit.com which provides this service for free. They also provide a free dynamic IP update client which makes sure that when your IP changes those changes reach the server. Get an account with them. And add your domain to it in the domain control panel. Make sure you only select only dynamic DNS service and not any of the other paid services. Install the IP update client that is available with dnsexit. Put in your login and passwd and the domain name you want to keep updated.

And that completes Part 2.

NOTE : It may take a day of two for the settings to propogate and everything to start working.


Alright now you have your website up and running.

     To create web albums using picasa is now simplicity itself. Open up picasa select a bunch of pics. Select Folder and Export as HTML page. For destination select c:\inetpub\wwwroot\ and click finish and thats it your album appears. Give everyone the address and become famous.




Resources

More CSS resources

Favorite Links