AppServ and HTTP Basics
Now that we have got our server program installed and ready to use, you need to learn how to use it. Every server has a designated web folder, meaning that everything within one folder, including its sub-folders, will be accessible to internet users. In AppServ, this folder is located at C:AppServwww (replace C:AppServ with whatever directory you decided to install it in, if you changed the default). To access the files within this folder, open up your favorite internet browser and type “http://localhost/filename“, in your address bar, without the quotes and replacing filename with the name of the file including the extension. For example, if you copy the picture fred.jpg to the web folder, you would access it by going to http://localhost/fred.jpg.
I am now going to detail a little bit about how the internet works. When your web browser requests a domain name, for example, how does it know where to go? For this task the internet has what is called DNS, or Domain Name Server. As its name implies, it is a way for domain names to be routed to the proper computer’s IP address. There are many DNS servers all over the world, with DNS tables that keep track of domain names and their corresponding IP address. Your ISP connects to one or more DNS server, so when you type in a domain name, it queries the table and finds the IP address to direct you to. Once you go to the IP address, you are connected directly with that computer. Your computer (the client in this case) sends a request to the server (the domain name you are going to). The language that they communicate in is HTTP, which on the server side is handled by Apache and on the client side is handled by your web browser. HTTP sends the requested information, or files, back to your browser, and the process starts over again. Here is a question for you: what happens if you run your own server, but you have a dynamic IP address? Don’t have a heart attack just yet, I will explain how to counter this on the next section.
No-IP Setup
For most of you with cable internet, you will have a Dynamic IP address, one that changes periodically. Since your server’s correct IP address must be in the DNS server tables to get your clients directed to your server correctly, how can you keep the IP up to date? The clever guys at No-IP developed an awesome tool that you can download for free HERE.
This tool will allow you to keep an update client on your PC that will refresh your IP address automatically when it changes. I recommend this for both cable and DSL users, just in case your IP address does change for some reason. Better safe than sorry.
Before you can start using this utility, you will need to register for your free subdomain, also through no-ip: http://www.no-ip.com/services/page/free/dynamic/dns. You will need to get a free subdomain, like http://yourname.no-ip.org. When it asks to add a host, your hostname is “yourname” in the example used. You also get to choose the domain that your subdomain is registered to. Your host type needs to be set to DNS Host (A). The rest of it, including your IP address needs to be left default. The MX record is for setting up e-mail, if you want to. Create a username and password that you can easily remember, and again, write it down! This will allow you to get the Dynamic Update Client (DUC for short) to work.
Now we will start to configure the DUC to update your IP address automatically. Run the DUC executable to start the installer. You need to follow the on screen instructions. Once everything is installed, read through the readme.txt file to familiarize yourself with its features and to get some helpful hints.
After the install is complete, it should open a dialog box asking for your email address and password. Enter this information and it should retrieve your subdomain for you. Click the Options button. You can leave most of these settings as default, unless you want to run the program at startup (Windows 9x, ME) or as a system service (Windows 2000, XP, NT). Hit ok, and put a checkmark next to your subdomain. This will allow DNS to be updated automatically when your IP address changes.
Now that you have got the DNS configured correctly, you need to tell your local network where to send incoming HTTP requests. If you do not have a router, then you can skip this paragraph. For those of you with routers, you need to open your web browser and go to your routers configuration IP. If you do not know what this is, please consult your router’s manual. Since all brands are different, I can not provide exact details in this article. Once you get here, you need to forward port 80 (or whatever port you chose to use for your server) to the IP address of the machine running the server. This just tells the router where to send requests that it recieves on port 80. Everything should be set up correctly and ready to go.
To access your server on PCs that are not on your local network, do you still type http://localhost/?
As its name implies, localhost refers to a local machine, not a server on the internet, so it will not work. This is where the sub-domain you registered will come in handy. On machines outside your local network, you will need to type your sub-domain instead of localhost. For example, you would type http://dhs.no-ip.info (your personal sub-domain) instead of localhost.
Conclusion
You should now be able to successfully set up a web server! You should be prepared to tackle a good old web site. I recommend you do some reading on HTML and CSS, as well as some .htaccess tutorials to password protect your directories. Here are some links that I thought would be helpful to the newbie web developers out there (like you!).
http://webmonkey.wired.com/webmonkey/
http://www.lissaexplains.com

Like what you read?
If so, please join over 28,000 people who receive our exclusive weekly newsletter and computer tips, and get FREE COPIES of 5 eBooks we created, as our gift to you for subscribing. Just enter your name and email below:







