My Photo
Name:
Location: Singapore, Northern Boundaries, Singapore

See it, Grab it

Friday, May 05, 2006

Web Hosting from home

Well, we are done with resolving your dominname to your everchanging IP address.
(php will not cover here)

What you need:
- PC

- An always-on broadband internet connection
- Apache server


Step 1. Install Apache HTTP server.
First and foremost, disable and stop any other firewall or server software you may have running, including Windows Firewall, Skype, Trillian or any other instant messaging applications. This is extremely important, and if it’s not done, can cause the server installation and startup to fail miserably. These programs and services can be started and used again as usual once we’re done setting up the web server.
Download under “best available version” next to “Win32 Binary (MSI Installer).” Start the installation wizard. Accept the license agreement and use the default location for the Apache files, in C:\Program Files\Apache Group\Apache2. When you reach the screen prompting for server information, enter your own email address and homeip.net as the domain information.
Complete the installation wizard using the “Typical installation” setting.
When it’s done, open your web browser and go to http://localhost/. If the page you see reads, “If you can see this, it means that the installation of the Apache web server software on this system was successful,” you’re golden.



Step 2. Configure Apache to share documents from the right folder.
Say you want to make your music collection downloadable using your new web server, and all your music files are located in C:\JohnS. Using a plain text editor like Notepad, open the C:\Program Files\Apache Group\Apache2\conf\httpd.conf file. This is Apache’s configuration file, which looks long and scary, but most of the defaults will work just fine for us. We just have to change a few things.
In this httpd.conf file, comment out the line that starts with DocumentRoot and add another with your directory, like this:
#DocumentRoot "C:/Program Files/Apache Group/Apache2/htdocs"
DocumentRoot "C:/JohnS"
Then, comment out the line that starts with

#

Last, about 20 lines below that

AllowOverride None
Change it to:
AllowOverride All
When you’re done, save httpd.conf. Then, click on the Apache icon in your taskbar and choose “Restart.” If Apache restarts successfully, you edited your the file correctly. Visit http://localhost/ in your web browser. This time you should see a listing of your documents.


Step 3. You’ve got a home webserver up n running!.
If you are NOT behind a firewall, you can access your web server from other computers by typing your computer’s IP address into a web browser’s address bar. If you’re not sure what your IP is, visit
What Is My IP to find out. If your IP is 12.34.567.890, then type http://201.4.567.890 into a browser’s address bar. If you are behind a firewall (like a wireless router), you’ll need to open up port 80 on the firewall and forward it to your computer.

0 Comments:

Post a Comment

<< Home