Web.design1.0
tutorials and resources
installing.apache
The first step is to download the packages :
* Apache : www.apache.org
* PHP : www.php.net
* MySQL : www.mysql.com
You should get the latest version of each package.
Now let's start the installation process one by one.
* Installing Apache web server
* Installing PHP
* Modifying Apache Configuration
* Installing MySQL
* Modifying PHP Configuration File
Installing Apache web server
Installing apache is easy if you download the Microsoft Installer ( .msi ) package. Just double click on the icon to run the installation wizard. Click next until you see the Server Information window. You can enter localhost for both the Network Domain and Server Name. As for the administrator's email address you can enter anything you want.
I'm using Windows XP and installed Apache as Service so everytime I start Windows Apache is automatically started.
Click the Next button and choose Typical installation. Click Next one more time and choose where you want to install Apache ( I installed it in the default location C:\Program Files\Apache Group ). Click the Next button and then the Install button to complete the installation process.
To see if you Apache installation was successful open up your browser and type http://localhost in the address bar. You should see an apache page with documention on the apache version that you downloaded.
By default Apache's document root is set to htdocs directory. The document root is where you must put all your PHP or HTML files so it will be process by Apache ( and can be seen through a web browser ). Of course you can change it to point to any directory you want. The configuration file for Apache is stored in C:\ProgramFiles\Apache Group\Apache2\conf\httpd.conf ( assuming you installed Apache in C:\Program Files\Apache Group ) . It's just a plain text file so you can use Notepad to edit it.
For example, if you want to put all your PHP or HTML files in C:\www just find this line in the httpd.conf :
DocumentRoot "C:/Program Files/Apache Group/Apache2/htdocs"
and change it to : DocumentRoot "C:/www"
After making changes to the configuration file you have to restart Apache ( Start > Programs > Apache HTTP Server 2.0.50 > Control Apache Server > Restart ) to see the effect.
Another configuration you may want to change is the directory index. This is the file that Apache will show when you request a directory. As an example if you type http://www.php-mysql-tutorial.com/ without specifying any file the index.php file will be automatically shown.
Suppose you want apache to use index.html, index.php or main.php as the directory index you can modify the DirectoryIndex value like this :
DirectoryIndex index.html index.php main.php
Now whenever you request a directory such as http://localhost/ Apache will try to find the index.html file or if it's not found Apache will use index.php. In case index.php is also not found then main.php will be used.
Next Installing PHP ---------------------or skip and go straight to MySQL
More on Apache web server tutorials