About     ru | pl
 
AV-School.com
AV-School — New source of IT-knowledge!
All-in-row News Articles
Blogs
Home / Users' blogs / User's blog Marina / Entry comments
Security Installing and configuring Apache + PHP + MySQL
Rating: +3
21 Jul 10 at 19:30
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…

Apache 2.2.13:
http://archive.apache.org/dist//httpd/binaries/win32/apache_2.2.13-win32-x86-openssl-0.9.8k.msi

http://archive.apache.org/dist//httpd/binaries/win32/apache_2.2.13-win32-x86-no_ssl.msi (without SSL module)

PHP 5.2.11:

[url=http://www.php.net/get/php-5.2.11-win32-installer.msi ]http://www.php.net/get/php-5.2.11-win32-installer.msi[/url]

MySQL 5.0.51:

http://dev.mysql.com/downloads/mysql/5.0.html#win32

Install Apache HTTP Server.







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


Artem Scherbina
"Design and Test Lab", Ltd. 2010
/specially for /





Rating:
+3
| More
Entry comments:
Roman Hwang
Rating: +1
# 13 Aug 10 at 09:10
Rating: 2
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 http://apache.inetbridge.net/httpd/binaries/win32/apache_2.2.13-win32-x86-openssl-0.9.8k.msi is broken. Just writing down the apache server address would be sufficient. That's just my opinion.

Good luck

Marina D&T Lab
Rating: +1
# 18 Aug 10 at 19:10
Rating: 5
Hello, Roman!
Thanks a lot for your comment. I and Artem Scherbina took into account the recommendations.

Good luck

Post a comment

Log in or register to post a comment.
Total number of registered users:  4810 
Online:  12 
Newbe: abwphbkyon

Who's online:
elvinaisais
0 min. ago
Guests online:  11 
Maximum online (10 May 2011)  80 
Blogs: 19
Posts: 131
Last: 25 Sep 2011
Comments: 5242
Last: Today
 Add new post
 All blogs
Hardware 8
Humor 0
News 2
Personal 48
Security 55
Software 16
Travel 2
 Tags 
linux security perl c++ malware seminar Windows Trojan eclipse programming browser automation virtualbox news IDA KNURE Russia Kharkov sandbox vaccination Virustotal ads c review Qt XML analysis ubuntu hardware interface vkontakte summer laptop battery camp stat rootkit photo social network language Facebook ru attack grub chromium
   Site Map    Feedback    About
Copyright © 2007-2012 «Kaspersky Lab.» : Powered By Danneo RCMSRSS