Host your own webserver

Martin Brinkmann
Jan 31, 2007
Updated • Nov 14, 2013

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 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.


Previous Post: «
Next Post: «


  1. M.Qayyum said on May 26, 2010 at 5:04 pm

    i hav setup domain on dyndns as u mentioned but it is keep asking of username/password ….i really can’t firure it out.

    1. Vanillaman said on May 27, 2010 at 8:57 am

      I might be wrong, but you may get this from your ISP, since it is only used by them to diagnose any connection problems. Usually, its the same for both username and password. Give it a try and let me know how you get on. I’ll do my best to try to help you.

  2. Vanillaman said on April 24, 2010 at 7:45 pm

    Giving out wrong info, yet again. DynDNS is NOT a Free service!

  3. julian said on February 3, 2008 at 3:54 am

    thanks for this but i am very new to software and im not sure how to set up so i can put files on it so others can donwload/view?

  4. Spider_crk said on March 4, 2007 at 7:27 pm

    Hi, thanks for the very useful tips, has been trying to get XAMMP to work but Apache does not run and the green indication does not appear.

    As I am a novice at this I would be grateful for any suggestions ?

  5. Pelmen said on February 22, 2007 at 1:34 am

    So for my friends to access the web server all they have to do is type in ??

    Sorry for double post.

    1. Martin said on February 22, 2007 at 7:52 am

      yes that is it.

  6. Pelmen said on February 22, 2007 at 1:30 am

    Martin you said:

    “Friends and everyone else who should access the webserver can then use the dynamic dns which looks something like instead of the dynamic IP address.”

    Is there supposed to be a http:// or an ftp:// or www or anything else with the


  7. Pelmen said on February 22, 2007 at 12:17 am

    I used the service you said to use “DynDNS”.

    1. Martin said on February 22, 2007 at 12:25 am

      I’m really not sure. It did not do this when I setup the service. I would try and contact the company that offers the service and ask them why this happens.

  8. Pelmen said on February 21, 2007 at 6:07 am

    I added a static dns to my ip but when i try to access it by putting my domain name it says ” enter username and password for WebAdmin (then my domain)”

    What does that mean?

    1. Martin said on February 21, 2007 at 10:57 am

      Which service are you using ? Maybe they add some sort of WebAdmin to it.

  9. iHelps said on February 3, 2007 at 1:44 am
    Reply just give it a try

  10. Cappella said on February 1, 2007 at 10:05 am

    I have been using HTTP File Server ( which is very lightweight, one executable and one configuration file. It does not have the full features of Apache, but it can do almost what the article has mentioned for XAMP. Can consider it too.

  11. Apache under Windows said on February 1, 2007 at 2:43 am

    There are quite a few WAMP Servers out there. See what works for you the best, as they have different components and ways of doing things.

    You should take a look at the Web-Developer Server Suite.

    It comes pre-configured with WordPress, MediaWiki, Drupal5, phpBB. And has its own DDNS solution at DynamicSide.NET.

  12. Everton said on February 1, 2007 at 1:17 am

    Can you explain a bit more about the security please. I’ve been trying to do this for a few days so far and I’ve got nowhere so far.

    (also the font size in your comment form is very small!)

    1. Martin said on February 1, 2007 at 9:23 am

      Everton what exactly do you want to know ? More information about .htaccess ? I fixed the font size btw.

      1. Everton said on February 1, 2007 at 10:17 am

        yes, how do you ensure that your files can’t be accessed by anybody

      2. Martin said on February 1, 2007 at 10:42 am

        Take a look at my second article, I explain how to password protect a folder and all subfolders there..

Leave a Reply

Check the box to consent to your data being stored in line with the guidelines set out in our privacy policy

We love comments and welcome thoughtful and civilized discussion. Rudeness and personal attacks will not be tolerated. Please stay on-topic.
Please note that your comment may not appear immediately after you post it.