How to Run A Webserver From Your Computer

Download ArticleDownload Article

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.

1

Choose a computer that's suitable to be a web server.

Download Article
  1. How.com.vn English: 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. Advertisement
2

Get good web server software.

Download Article
  1. How.com.vn English: This 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 your web server.

Download Article
  1. How.com.vn English: After installing, you'll have to set up your web server.
    Normally the web server program has a guide on how to do this.
  2. Advertisement
4

Create a basic main page to test the server.

Download Article
  1. How.com.vn English: The test page should be in the web server's document path.
    Give the file a name that ends with the ".html" extension.
5

Check that you can see the website from http://127.0.0.1/.

Download Article
  1. How.com.vn English: ...
    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.
  2. Advertisement
6

Get a friend to test your site on http://yourWANip/.

Download Article
  1. How.com.vn English: 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.

Download Article
  1. How.com.vn English: A static IP address will work best.
    If you have a dynamic IP, make sure that the domain registrar has dynamic DNS services.
  2. Advertisement
8

Create your website.

Download Article
  1. How.com.vn English: Now you can design your dream website.
    If you want to use server-side scripting you will need to install those applications and configure them in your server.


Community Q&A

Search
Add New Question
  • Question
    Can I work on my PC after turning my PC into a web server?
    How.com.vn English: Community Answer
    Community Answer
    It is possible to do so, however, using your computer while it is a server means that you are opening your computer up to unnecessary vulnerabilities. Server = Server PC/Mac/Computer = Computer. Yes, you can do what you're asking, however it is very much urged against doing so.
  • Question
    Can I use a Windows server instead of Apache?
    How.com.vn English: TruGenX Lab
    TruGenX Lab
    Community Answer
    Yes, but for Windows, you need to learn IIS first, then use the Apache plugin if you need it. Otherwise IIS will work just fine. If you want to move to a free OS like a Linux Distro, then Apache is the way to go.
Ask a Question
200 characters left
Include your email address to get a message when this question is answered.
Submit
      Advertisement

      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/.
      Show More Tips
      Submit a Tip
      All tip submissions are carefully reviewed before being published
      Thanks for submitting a tip for review!
      Advertisement

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

      Things You'll Need

      • Computer
      • Web server program
      • Stable internet connection

      About This Article

      How.com.vn is a “wiki,” similar to Wikipedia, which means that many of our articles are co-written by multiple authors. To create this article, 24 people, some anonymous, worked to edit and improve it over time. This article has been viewed 319,795 times.
      How helpful is this?
      Co-authors: 24
      Updated: March 7, 2024
      Views: 319,795
      Categories: Programming | Internet
      Thanks to all authors for creating a page that has been read 319,795 times.

      Is this article up to date?

      ⚠️ Disclaimer:

      Content from Wiki How English language website. Text is available under the Creative Commons Attribution-Share Alike License; additional terms may apply.
      Wiki How does not encourage the violation of any laws, and cannot be responsible for any violations of such laws, should you link to this domain, or use, reproduce, or republish the information contained herein.

      Notices:
      • - A few of these subjects are frequently censored by educational, governmental, corporate, parental and other filtering schemes.
      • - Some articles may contain names, images, artworks or descriptions of events that some cultures restrict access to
      • - Please note: Wiki How does not give you opinion about the law, or advice about medical. If you need specific advice (for example, medical, legal, financial or risk management), please seek a professional who is licensed or knowledgeable in that area.
      • - Readers should not judge the importance of topics based on their coverage on Wiki How, nor think a topic is important just because it is the subject of a Wiki article.

      Advertisement