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)

Installing Apache

  1. Install the apache from the installation package. After you have installed the apache, edit the "httpd.conf" file located in the "APACHE\conf\" directory.

    If the "httpd.conf" doesn't exists, copy and rename the "httpd.conf.default" to "httpd.conf".

    Add the following lines at the end of the file

    NameVirtualHost NameVirtualHost <VirtualHost> ServerName digitalamit.loc ServerAlias www*.digitalamit.loc DocumentRoot "D:/www/digitalamit" <Directory "D:/www/digitalamit"> Options Indexes FollowSymLinks +Includes +ExecCGI AllowOverride None Order allow,deny Allow from all </Directory> </VirtualHost>

    where is the server's ip address and the "d:/www/digitalamit" is the folder where you have have or will store your website files.
    Note: If you are installing on your server then don't write the line NameVirtualHost and use only

  2. Open notepad, paste the following lines to it:

    <html> <head> <title>My first served page</title> </head> <body> Hello, World! </body> </html>

    and save it as d:\www\digitalamit\index.html

  3. Start the apache by executing the APACHE\bin\apache.exe file or from the Start Menu > Apache HTTP Server > Control Apache Server > Start

  4. Goto your browser and type www.digitalamit.loc You should see the html page we just created. Now, your Apache web server is running successfully.

  5. STOP Apache server, so that we can integrate PHP into it.


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