How to make PC Server
BY.MICKY VERMA
If you want to do this on linux instead of windows (more secure, slightly more complicated) the best combination would be puppy linux and xamp for the server software. Puppy linux can be loaded off a usb jump drive or a CD, so you don't need to uninstall windows, just boot the computer with one of those. Here's easy setup videos for puppy linux: http://rhinoweb.us/
See this instructable for how to install xamp once you have puppy linux (or some other linux) working: Here's an answer I gave to a comment a while ago asking how to change the webpage that pops up when you go to the localhost address.
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). If you want to work towards home automation you'll need to look into how to code your webpage to access ports on your server (for instance a serial port). These ports can send out electrical signals to things outside of your computer (like robots and microcontroller), thereby allowing 'home automation'. One way of doing this would be to use javascript invoked ActiveX (for instance see: http://strokescribe.com/en/serial-port-internet-explorer.html)
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..
Here are some useful references:
http://johnbokma.com/windows/apache-virtual-hosts-xp.html
http://groups.google.com/group/comp.infosystems.www.servers.ms-windows/browse_thread/thread/866bad569981327c/b1d7fb821ab94a8f?hl=en&lnk=gst&q=web+page#b1d7fb821ab94a8f
http://www.tivohelp.com/archive/tivohelp.swiki.net/31.html
BY.MICKY VERMA
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 (I'll cover that in future instructables).
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 (so that people don't hack into your computer). I'll give this advice but read elsewhere for more:
1) best to install this server software on an old computer that you don't use for anything other than as a server.
2) best to create a seperate user account in windows with limited system access and install this software in that account.
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 (so that people don't hack into your computer). I'll give this advice but read elsewhere for more:
1) best to install this server software on an old computer that you don't use for anything other than as a server.
2) best to create a seperate user account in windows with limited system access and install this software in that account.
If you want to do this on linux instead of windows (more secure, slightly more complicated) the best combination would be puppy linux and xamp for the server software. Puppy linux can be loaded off a usb jump drive or a CD, so you don't need to uninstall windows, just boot the computer with one of those. Here's easy setup videos for puppy linux: http://rhinoweb.us/
See this instructable for how to install xamp once you have puppy linux (or some other linux) working:
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.
What To Download:
= You should download the newest version (highest version number), it's 2.2.6 as I type this. Check here to see what the newest version is if you want: http://httpd.apache.org/
= You want the .msi file, this is a windows installation file (like an .exe)
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.
What To Download:
= You should download the newest version (highest version number), it's 2.2.6 as I type this. Check here to see what the newest version is if you want: http://httpd.apache.org/
= You want the .msi file, this is a windows installation file (like an .exe)
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 (or don't doesn't matter much).
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 (or don't doesn't matter much).
Step 3: Run It
Once it's installed I think 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 (see pic). If it's not running and you want to start it, or stop it, just navigate in your start menu (see pic).
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.
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, this should show up (see pic).
Yay, it works, now do something useful with it (will be covered in future instructables,.. maybe)
http://localhost
into the address bar, this should show up (see pic).
Yay, it works, now do something useful with it (will be covered in future instructables,.. maybe)
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). If you want to work towards home automation you'll need to look into how to code your webpage to access ports on your server (for instance a serial port). These ports can send out electrical signals to things outside of your computer (like robots and microcontroller), thereby allowing 'home automation'. One way of doing this would be to use javascript invoked ActiveX (for instance see: http://strokescribe.com/en/serial-port-internet-explorer.html)
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..
Here are some useful references:
http://johnbokma.com/windows/apache-virtual-hosts-xp.html
http://groups.google.com/group/comp.infosystems.www.servers.ms-windows/browse_thread/thread/866bad569981327c/b1d7fb821ab94a8f?hl=en&lnk=gst&q=web+page#b1d7fb821ab94a8f
http://www.tivohelp.com/archive/tivohelp.swiki.net/31.html
No comments:
Post a Comment