It is relatively easy to use your home computer running Windows to become a webserver that is accessible from anywhere. The following method is highly flexible and makes it possible 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://yourdynamicip; 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.
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.
There is one last thing that can be optimized. It is difficulty for others to access your webserver if you have dynamic IPs. 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 webserver can then use the dynamic dns which looks something like subdomain.dyndns.bz instead of the dynamic IP address.
Related posts:
Run a local proxy serverSecure your server with htaccess
Install Wikipedia Locally
Run Your Own Home Web Server
How to setup Hotlink Protection
18 Responses to “Host your own webserver”
Trackbacks/Pingbacks
-
[...] Host your own webserver [...]
-
[...] have detailed the process of installing and running a local Apache web server before but this method puts some strain on the system and is probably an overkill for a quick test [...]


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!)
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.
Everton what exactly do you want to know ? More information about .htaccess ? I fixed the font size btw.
I have been using HTTP File Server (http://www.rejetto.com/hfs/) 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.
yes, how do you ensure that your files can’t be accessed by anybody
Take a look at my second article, I explain how to password protect a folder and all subfolders there.. http://www.ghacks.net/2007/02/01/run-a-local-proxy-server/
http://www.aprelium.com/ just give it a try
Hello,
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?
Which service are you using ? Maybe they add some sort of WebAdmin to it.
I used the service you said to use “DynDNS”.
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.
Martin you said:
“Friends and everyone else who should access the webserver can then use the dynamic dns which looks something like subdomain.dyndns.bz instead of the dynamic IP address.”
Is there supposed to be a http:// or an ftp:// or www or anything else with the subdomain.dyndns.bz?
Thanks
So for my friends to access the web server all they have to do is type in
pelmen.dyndns.bz ??
Sorry for double post.
yes that is it.
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 ?
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?