Turning your PC into a Web Server

Status
Not open for further replies.

[lokesh]

Journeyman
Most of them must be having this question as how to setup or turn your pc into a web server. Well, here is the way to do it.

[STEP 1]
There are various web servers available free to download and it is known that Apache web server is considered to be the best.
If you are going to run only static content in your server,i.e pages only with HTML content [ else proceed to [STEP 2] ], then any web server will do better.
Just goto ::


*www.download.com/3120-20_4-0.html?qt=web+server&tg=dl-2001&search.x=0&search.y=0&search=+Go!+

There are a lot of web servers listed there, both free and trials....you can choose any of them...only thing each one will have different way of configuring them, you can try them once you are familiar to installing, configuring, and using web servers.
So let me explain with this :

*www.aprelium.com/abyssws/ [ Abyss Web Server ]

Now download and install Abyss Web server. Then start the web server...put all your HTML pages in the specified directories ( i.e. www or htdocs, etc. depending on the web server you use), now you have set up the web server. Just add a HTML file named index.html in the www or htdocs folder and goto:: *localhost, you should be able to see the page you added in the directory. Proceed to [STEP 3].


[STEP 2]

If you are going to run a dynamic content in your server, i.e. Database driven website ( PHP/MySQL ), then Apache web server will do better, but downloading Apache server, PHP,& MySQL all seperately and then installing and configuring them gives you a lot of trouble and even consumes a lot of time. So it is better to use PHPDEV or PHPTriad, since both of them come with the complete package of Apache server, PHP, & MySQL, and installation takes just few minutes.You can download them from here:
These are not the only packages available, just use download.com to search, you will find a lot of them,

*sourceforge.net/projects/phptriad [b][ PHPTriad ][/b]

But if you are new to creating dynamic content, my recommendation is to use Abyss Web Server. It can not only be used to run HTML but also it has cgi-scripting support, so PHP can also be run using this server. Making the server to execute PHP scripts is very easy. Follow the steps below ::

But first you have to download and install PHP, here is the PHP installer for windows::*www.php.net/downloads.php

During the installation of PHP, you are asked about the type of your web server. Choose None (or other web server), I will configure the web server manually and proceed.

Open Abyss Web Server's console, select Server Configuration then press Advanced... and select CGI Parameters
Set CGI Processing Enabled to Yes.
Press Add... in the CGI Interpreters table.
In the Interpreter Path field, enter the path of the php.exe executable file. If you have installed PHP in C:\Program Files\PHP, enter C:\Program Files\PHP\php.exe.
Enter php in the Associated extensions and press OK.
Press Add... in the CGI Paths table.
Enter / in the CGI Path field and press OK.
Press Add... in the User CGI Environment Variables table.
Enter REDIRECT_STATUS (with no leading or trailing spaces) in the Name field and 200 in the Value field and press OK.
Press OK in the CGI Parameters dialog.
Select Server Parameters.
Press Add... in the Index Files table.
Enter index.php in the Index file field and press OK.
Press Restart to restart the server.
*www.aprelium.com/

Here you are, you have finished setting up your Abyss Web Server. Make sure you have MySQL installed if you are planning to use databases. There is also support for ASP in Abyss Web Server. Visit *www.aprelium.com/ for more info on setting up the server to run ASP.
Put all your HTML or PHP files in htdocs folder in your Abyss server installed directory. Goto *localhost, if everything went fine then you must see Abyss Server index page.


[STEP 3]
Dynamic IP Redirection
Now that you have set up the web server, after you connect to the internet people can access the content in your server using the ip address. Each time you connect to the internet your ip address changes ( provided your having a dial up account or an internet connection with dynamic ip address). You can always know your ip address by typing the following command in the dos prompt :: c:\>ipconfig
But sometimes your ip will also change from time to time even if you are connected to the internet 24 hours. So you need a service which redirects users to your present ip address,( i.e. the domain name gets updated with the new ip address each time it changes), when they type in your domain name. This is called Dynamic IP Redirection.
There are lot of companies which offer this service free of cost.
But first,you need another software to be running in your system, which updates the Domain name server with your ip address at frequent intervals.
In order to explain i will be using DirectUpdate, which is a shareware.
You can download it from here ::
*www.directupdate.net/download.html [ DirectUpdate ]

After installation, run directupdate, here you will be shown up with the following screen, click on the status tab.



*webdev.buildtolearn.com/win3.gif

*webdev.buildtolearn.com/win4.gif

Then next to accounts click on create button, you will be shown up with the following,
Click the drop down list box next to account type, you can see the list of companies offering the service. I have chosen to use the service from dyndns.org. So before you proceed any futher, you will have to sign up with dyndns.org

-->Goto :: *www.dyndns.org/account/create.html [ DynDNS.org ] and create an account.
-->Next login with your username and password & goto :: *www.dyndns.org/account/ , you will see something like this:


*webdev.buildtolearn.com/win1.gif

-->Click on add host in "Dynamic DNS( Add Host )" and then you will be seeing this page:

*webdev.buildtolearn.com/win2.gif

-->Type in a hostname and then a choose a domain name from the available list. If you have have your own domain name goto custom DNS.Your ip address will be filled in automatically, leave the other fields as it is unless you know them.Click on add host

Now you have finished with your signup and subdomain name.Now go back to the software setup where we left.
Fill in the required fields such as your chosen domain name, username, password and then click on ok. That's it, you have also setup a domain name to redirect users to your server.


Static IP
If you are having a cable internet connection with static ip, then there is no need of the software to be used. Just provide the host name for Static IP instead of clicking on Dynamic IP.
 
OP
L

[lokesh]

Journeyman
@digen

For your kind information.....this tutorial is 100% my work and yes my nickname is webdev...buildtutorials is another website of Buildtolearn....and i posted my tutorial there formally with both my real name and my nickname....here's the link,
*www.buildtutorials.com/?m=show&id=184
 

digen

Youngling
Oh good for you dude.But with "copy pasters" all around the forum one could make a mistake.I admit the ignorance on my part.
Moral of the story:Mention the source even if its yours. lol
 
OP
L

[lokesh]

Journeyman
Yeah..even i had seen many copy pasting things without even knowing what it is...lol...and now it becomes a tough time for the original authors....
 

h4xbox

Journeyman
In Red hat and pcq linux we can install them very easily unlike windoes and we can also configure them with some xperience
 

cheetah

In the zone
Na apache is the best cos it support many additional things like .htaccess....

Also some softwares like PHP-Nuke run with apache only..
 
Status
Not open for further replies.
Top Bottom