Run A Webserver From Your Computer

If you have a website too big for a commercial web host or you want to be able to quickly make changes on your website, you may want to try to run your own web server on the computer you are viewing this page from. This guide will tell you home web server basics and not tell you how to work with a particular software.

Steps

  1. Find your web server computer. The computer should be able to store a lot of information. The processor is not very important. If you have a router, the computer should be directly connected to that router and not wireless to minimize server downtime.
  2. Get a good web server program. The program runs the web server so it is very important. If possible, find a program that can run in the background without making your computer unusable. One of the more popular web servers is Apache.
  3. Configure the web server. Normally the web server program has a guide on how to do this.
  4. Create a basic main page to test the server. Make sure that you put this file in your web server's document path and name it as one of the index files.
  5. Check that you can see the website from http://127.0.0.1/. If you see the site continue to the next step. If your server does not run on port 80 then test your site on http://127.0.0.1:portnumber/. You may need to reconfigure your web server if you can't see this site at all.
  6. Get a friend to test your site on http://yourWANip/. If he/she sees the site then continue on. If not, check some of the tips.
  7. Purchase a domain and set it to your WAN ip. If you have a dynamic ip, make sure that the domain registrar has dynamic DNS services.
  8. Make your site. If you want to use server-side scripting you will need to install those applications and configure them in your server.

Tips

  • Keep your computer running all the time. You can turn off the monitor or if the web server program runs in the background, you can put your computer "to sleep".
  • If anybody outside your network can't see your website at http://yourWANip/ and you are behind a router you will need to port forward. Since routers vary there are different ways to do this. Consult the manual that came with your router or search your router on Google.
  • You probably won't be able to see your own website using the domain you bought. You should see it from http://127.0.0.1/ or http://yourLANip/.
  • You may also find your website at http://localhost/.
  • If you can't see your website on http://127.0.0.1/ you may need to unblock port 80 from your firewall.

Warnings

  • Check with your ISP to make sure you are allowed to have a home server. Some request that you use another port other then port 80. If so you will need to configure your webserver to listen on another port.
  • Do not put large files up for download, this will make your computer run a lot slower on the internet.

Things You'll Need

  • Computer
  • Web server program
  • Stable internet connection

Related Articles