Setting up your first web server on windows with Apache, PHP and MySQL
Published: August 5, 2003
User Rating: 9.2 (362 votes)
Installing Apache
-
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 127.0.0.1 NameVirtualHost xxx.xxx.xxx.xxx <VirtualHost 127.0.0.1 xxx.xxx.xxx.xxx> 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
xxx.xxx.xxx.xxxis 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 lineNameVirtualHost xxx.xxx.xxx.xxxand use only -
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 -
Start the apache by executing the
APACHE\bin\apache.exefile or from the Start Menu > Apache HTTP Server > Control Apache Server > Start -
Goto your browser and type
www.digitalamit.locYou should see the html page we just created. Now, your Apache web server is running successfully. -
STOP Apache server, so that we can integrate PHP into it.


