November 9, 2015

How to turn your PC into a Webserver to host a website?

A web server is an information technology that processes requests via HTTP, the basic network protocol used to distribute information on the World Wide Web. The term can refer either to the entire computer system, an appliance, or specifically to the software that accepts and supervises the HTTP requests.Opera today unveiled Opera Unite, a new technology that shakes up the old client-server computing model of the Web. Opera Unite turns any computer into both a client and a server, allowing it to interact with and serve content to other computers directly across the Web, without the need for third-party servers.

Opera Unite makes serving data as simple and easy as browsing the Web. For consumers, Opera Unite services give greater control of private data and make it easy to share data with any device equipped with a modern Web browser.
For Web developers, Opera Unite services are based on the same open Web standards as Web sites today. This dramatically simplifies the complexity of authoring cutting-edge Web services. With Opera Unite, creating a full Web service is now as easy as coding a Web page.
Opera Unite is available in a special version of the Opera 10 desktop browser from Opera Labs. Opera Unite services run directly in the browser.

 Download the Opera Unite build from http://labs.opera.com/.  To start Opera Unite, click the Opera Unite logo in the lower left-hand corner of the browser and log in with your existing Opera ID - the same Opera ID used for other Opera services such as My Opera and Opera Link. Opera Unite will prompt you to register an Opera ID if you do not have one.  Now you are ready to use Opera Unite. Simply access your Opera Unite services from the Opera Unite panel of the browser. New services can be installed from http://unite.opera.com/.

 Running a service will give you a direct Web address to the Opera Unite service on your device, for example: http://install.user.operaunite.com/downland/, where "install" is the name of the local device serving content, "user" is your username, and "downland" is the Web service being accessed. That link will also allow others to access the same Web service from your computer through their Web browser.
    
  This covers how to quickly set up your computer (running Windows) as a server. This will allow you to host your own website from your computer and will let you to make web pages with 'buttons' allowing you to control things in your home (robots, cameras, etc) from the internet.
We'll be using apache: very popular, free, open source server software.
While making your computer into a server will be very quick, you should read through the Apache http server software documentation to learn about how to set it up securely.

Step 1: Download Apache Server Software

Download the apache http server software from this apache mirror site:
http://www.reverse.net/pub/apache/httpd/binaries/win32/
_Or_ go to http://www.apache.org/, navigate to the download from mirrors page, pick a mirror and download from there. As you can see from the above link, you'll want to navigate to the mirror's apache, httpd, binaries, win32 folder.

 You should download the newest version (highest version number), it's 2.2.6. Check here to see what the newest version is if you want: http://httpd.apache.org/ .
You should download the .msi file.

Step 2: Install It

Double click the .msi file you just downloaded, it will install, use the default settings, typical install (unless you want the source code, then do custom install).
It should automatically fill in some form boxes with your DNS server name (in my case it was earthlink.net) during the installation.
for server name, put whatever you want, I don't think spaces are allowed though. and make sure after your name you have .earthlink.net (or whatever DNS name is). For email, put in your email.

Step 3: Run It

Once it's installed it starts the server running right away. You can see if it's running by looking for the icon in the lower right of your task bar . If it's not running and you want to start it, or stop it, just navigate in your start menu.If you get an error message when you try to start the server write down the error# and look it up in the documentation or google.

Step 4: Test It

Test it out, when you're sure the server is running open a web browser and type:
http://localhost into the address bar and check it.
 
Step 5: Change the webpage

The default webpage that says "it works" is coded in a file called index.html. You can edit/replace the default index.html file in the folder 'htdocs' which is in your apache folder (wherever you installed it).
After you've edited the index.html file you should be able to access that index.html from any other computer on the web by typing in your server's IP address. If your ISP (internet service provider) uses static IP addresses you just type in the IP address every time to access your page. But if your ISP uses dynamic IP addresses you'll need to look up your server's IP address each time you disconnect/reconnect it to the web. There are free services that will do this for you: DNS2Go or dyndns.org.

No comments:

Post a Comment