Software Installing and configuring Apache + PHP + MySQL
Though you can find a large amount of information about Apache HTTP Server installation on the Internet, I decided to gather these materials and discuss the main issues of the installing and configuring server components in this article. It will be useful to those who decided to investigate it in more detail and more consciously administrate their sites. So, let’s begin. Download the installation files from the official sites…
Enter the names of our domain and server in the appropriate fields:
We chose the typical setup type:
Select the destination folder or do not change it.
Press "Next" all the time and finish the installation. Then we should check the work of installed server.
"It works!" It is already good. Apache is installed. Now we are installing PHP.
Select the destination folder.
Specify the version of the installed Apache.
Now we need to specify the directory containing the Apache configuration file "httpd.conf". It is necessary that setup module would be able to add its own settings in Apache configuration directory.
By default it will be here:
You can also install additional features.
Press "Next" and finish the installation. Now Php is also installed and we are going to the last installation. We will install MySQL Server 5.0.
We select the typical setup type.
Do not remove the selected option and go directly to configure MySQL server
Select a standard configuration.
We choose "install as Windows service" to launch the MySQL Server automatically.
Enter the root password.
Press "Execute" and finish the installation.
Now all components are installed. The control of MySQL server from the console is not easy. A console of course is a good thing, but GUI is better. So do not be lazy to download and install mysql gui tools.
Now we’ll turn to the main - our server configuring and site creation. To begin we define the directory that will contain our site. My site will be located in:
Create 2 folders under the names www and logs.
The "www" folder will contain all files of our site, "logs" - 2 log files:
error.log;
access.log.
We created 2 empty file "error.log" and "access.log". So, now we have to register our new site in Apache configuration file. Search for "httpd.conf" file, it is usually located here:
A backup of the file "httpd.conf.bak" also is located there, so you can always restore the original one. Open the configuration file. There is a lot of text :) As you have guessed, text after the symbol "#" is comments. So, in fact, there are not so much instructions. The first thing that we can see is , the path to the main components of Apache is here. We will not change anything, look on. Search for a line and include the path to the directory that will contain our site:
Now we will specify the lines that enable/disable access to the directory containing our site and all its subdirectories. Find the following line:
Change it for:
Then we will find:
Add files that will be opened by Apache by default when accessing the directory to
Now we will include the path to our log files in the and lines
Then we are searching for the lines
and adding one more to process the files with extension PHP
That's all. Now create the first page of our site in the directory C:/Mysite/www
with simple code.
Look at it.
Everything works. Hooray! Now we will consider a database administration. Once MySQL GUI Tools are installed, we will launch the application MySQL Administrator. We log on under the root account.
And we can see all databases that are administrated very easily.
There is MySQL Query Browser tool for sending SQL requests by hand. It includes an excellent help file for SQL commands.
In fact that’s all. As you can see, the server installation from scratch is not a problem. If you want to investigate the intricacies of Apache HTTP Server configuration in more detail please read the manual for "httpd.conf". There is a lot of interesting information :)
Hello, Marina.
Nice article.
There's a typo in the beginning of the article. MsSQL -> MySQL.
And a hyperlink of PHP is not written properly.
I recommend you to avoid specifying the exact versions, because they usually change.
For example, this link [url=http://apache.inetbridge.net/httpd/binaries/win32/apache_2.2.13-win32-x86-openssl-0.9.8k.msi]http://apache.inetbridge.net/httpd/binaries/win32/apache_2.2.13-win32-x86-openssl-0.9.8k.msi[/url] is broken. Just writing down the apache server address would be sufficient. That's just my opinion.
Good luck
Hello, Marina.
Nice article.
There's a typo in the beginning of the article. MsSQL -> MySQL.
And a hyperlink of PHP is not written properly.