It is relatively easy to turn your home computer running the Windows operating system into a web server that you can use to host Internet sites or files that are then accessible on a local network or on the Internet.
The following method is highly flexible and enables you to host websites, documents and files on that server and protect the contents with passwords if so desired. All you need is a software called XAMPP which installs the Apache server environment on your computer.
Download Xampp for Windows and install it on your system. It does not matter if you install the modules as services, you can activate them as well by opening the control panel (start apache).
Once installed the webserver should be accessible by typing in http://localhost or http://yourIP/ in the address bar of your web browser. You can look up your dynamic ip using my ip lookup script. Hosting files is as easy, just upload all the files that you want to share into the subfolder htdocs or create a subfolder and add the files to it.
If you want more control. use a HTML page to list the files so that it becomes easier to access them. Some file types, like images or videos, can also be displayed directly on the page so that you can preview them or view them directly on it.
Access the subfolder by appending /subfolder/ to the url that you want to access. You can add html and php files as well and those can be accessed as well similar to those files on other websites. It is easy to secure folders or the complete server using so called .htaccess files. Use the htaccess generator and add the generated files to your directories that you want to protect.
Protection is especially important if you make files available that you do not want others to have access to. While they would need to find out about the server IP first, and maybe even the subfolder where you are hosting your files, not-protecting them would mean that they would gain direct access to all files hosted there.
There is one last thing that can be optimized. It is difficult for others to access your web server if you have dynamic IPs. Dynamic means that your IP address changes frequently so that you would have to notify users with access every time it changes so that they do not lose access to it.
To counter this you could use a free service like DynDNS which adds a static dns to your IP. Friends and everyone else who should access the web server can then use the dynamic dns which looks something like subdomain.dyndns.bz instead of the dynamic IP address.
One benefit of hosting your own server as opposed to using a file hosting service like SkyDrive or Dropbox is that you have full control over your files.Advertisement
Ghacks is a technology news blog that was founded in 2005 by Martin Brinkmann. It has since then become one of the most popular tech news sites on the Internet with five authors and regular contributions from freelance writers.