Setting up your first web server on windows with Apache, PHP and MySQL
by Amit Arora
Published: August 5, 2003
User Rating: 9.1 (514 votes)

Page Page » 1 2 3 4 5 6 7 8

Preparation

While the files are being downloaded, you can prepare your server in the meantime.

  1. Checking the server for connection
    Make sure that the server is connected to the other computers and centrally accessibly by the clients (or from computers). You can check this by ping the server computer. To do that issue the following command at the client computer:

    ping xxx.xxx.xxx.xxx

    where xxx.xxx.xxx.xxx is the ip address of the server computer. For e.g.

    ping 192.168.0.1

    if you receive a series of reply from the server, then the clients can access the server.

    Note: If you are installing on a single system, or on your own system for personal use, then use 127.0.0.1 as your ip address

    If you are unable to receive any response from the server, make sure:

    1. The system in on and running.
    2. Network cables are properly connected and that OS shows an active connection on it. It might be a loose connection from hub to other system in between.
    3. Your firewall isn't blocking your clients from accessing your server.

  2. Creating the root web directory
    Create a directory c:\www or d:\www. This directory would be used as the root directory where all the sites and intranet applications would be saved. So lets say if we were to keep a copy of our own site, then we would create a sub-directory name digitalamit and the structure would be c:\www\digitalamit and so on for other web sites

  3. Creating a virtual domain name
    We want our website to have a virtual domain name. Taking the example of our own website, lets say it to be digitalamit.loc. Now the reason why .loc has been added is to represent that is a local (internal), intranet web site. You can follow the same convention for local website and avoid any confusion between the local copy and on the real web server.

    To do this we 'll have to tell your your network where to redirect when a local domain is requested. So we have to put the entry for it on your local gateway server or local DNS server. For single system network, your local system is your DNS server.

    To do this, we would have to create or modify the "HOSTS" file. On Windows 95/98, goto Windows Directory and edit "HOSTS" file (without quotes), no extensions, just the file name. If you don't find HOSTS file in the windows directory, try finding the "HOSTS.sam" file. This is a sample HOSTS file provided by Microsoft to let you know on how to use the HOSTS file

    On Windows NT/2000/XP, this file is located in the "WINDOWS\system32\drivers\etc" directory. If the file doesn't exist, create it.

    Add the following lines to the file

    127.0.0.1 localhost xxx.xxx.xxx.xxx domain.loc www.domain.loc

    where xxx.xxx.xxx.xxx is the ip address of the server computer.

    Note: If you are installing on a single system, or on your own system for personal use, then use 127.0.0.1 as your ip address

    And instead of writing domain.loc, write the name of the site you are making, taking an example of our own site digitalamit, write something like this:

    127.0.0.1 localhost 192.168.0.1 digitalamit.loc www.digitalamit.loc

    Save and close the file and issue the following command in command prompt, first on the server and then on ALL the clients to check whether the domain name is accessable from all the clients or not.

    ping digitalamit.loc

    or whatever domain name you have entered. If you receive a series of reply from the server, then the host configuration is complete.

    In case you are unable to ping to new domain, try with the ip address. If still unable, check the action list as mention above. In case, if for some reason your cann't edit the HOSTS file or not allowed to, then you 'll have add the above lines in each and every clients HOSTS file.

Page Page » 1 2 3 4 5 6 7 8

About

Amit Arora is web developer with expertise in developing eCommerce enabled websites for the businesses.

Contact | Resume

Subscribe to newsletter




Get Firefox

Monitored by Site24x7
Uptime