Host A Web Server On Your Home PC.
Head to www.rejetto.com/hfs/ ?f=dl and download Http File Server (HFS). It is free and open source, and is a standalone executable that requires no installation.
On XP with SP2, when you run HFS, you will be asked about whether or not to allow hfs.exe to connect to the Internet. Unblock HFS. Likewise, if you have a third-party firewall installed, configure it appropriately.
Http file Server
2. Configure The Port
By default, HFS uses port 80. If your firewall is blocking port 80, set HFS to use some other port (such as 8080 or 8245 and so on). To change the port number, turn HFS off by clicking on the green “On” button at the upper left corner. Change the port and turn HFS back on.
Also, if you are behind a router or firewall, you may, in some rare cases, need to set up port forwarding. The best way to go about this is to go to www.portforward.com. There, choose your router type, then choose the program you want to set up port forwarding for, which in our case is HFS. In such a scenario, you cannot proceed unless you know which router you are using.
3. Test HFS
To test whether your settings work, click the Menu in HFS and choose “Self Test”. If the test completes successfully, your settings are correct. You should now be able to point your Web browser to your IP address and see HFS’ default Web page.
4. Register A Domain
For setting up a Web site, you need to first assign it a domain name. For this, you need a DNS service running on your computer. You need to get one from a site that offers such a service. There are quite a few sites that offer such services, and we’ve chosen No-IP. This site offers a variety of free sub-domain names that you can register for your Web site.
Go to www.no-ip.com/newUser.php to create a No-IP account. Log on to the site with the account you created, and click on the Services button. Click on “Hosts / Redirects” on the left and then on Add. In the page that opens, enter a hostname of your choice and select from amongst the free domains available. Then choose the host type; “DNS Host” (Option A) is usually the best option.
Your ISP might be blocking inbound port 80; to get around this, choose “Port 80 Redirect”. When you use this and run your Web server on an alternative port, users will not need to type a port number in the URL.
Click on “Create Host”. Your domain will be available within five minutes of registration. You can use and give out this domain name instead of your IP address.
If you would like to use a domain name of your own, No-IP offers a custom DNS service for a yearly fee.
5. Install the Dynamic DNS Update Client
Skip this step if you have a static IP. If you don’t, you will need a client software to take care of your changing IP address. Go to www.no-ip.com/downloads.php?page=win to download the No-IP.com Dynamic DNS Update client software. Install it and provide your login details. This program will sit in the system tray and automatically update your No-IP account when your external IP address changes.
6. Launch Your Web Site
You can now decide what page will appear when someone types in the name of your Web site. To change the default page, open HFS and click on “You are in Easy mode” to turn on Expert mode. Right-click on the little “house” icon in the Virtual File System (VFS) and click on “Bind root to real-folder”. When prompted, point to the folder that contains the file you wish to display by default on your site. Click on “Default file mask…” and type in the name of the file you’ve chosen for this file, such as “index.html”. Press [Ctrl] [S] to save the VFS to any location on your hard disk.
If it is only files you wish to share with friends, you can just host the files on the site-an index.html is not necessary. Just drag and drop files into the VFS window and save the VFS. These files will be available for download from the opening page.
To make HFS start with Windows, choose Start/Exit > Run HFS when Windows starts. Also make sure to checkmark “Reload on startup VFS file previously open”. You’re done!
The method of Web hosting we’ve described is good enough if you wish to share files with friends or to create content for a few people to view. It is not recommended for high-traffic situations, though.