Edit the Apache config
Open in your favorite editor file/etc/httpd/conf/httpd.conf.
You can edit the mcedit (# mcedit/etc/httpd/conf/httpd.conf) or, for your convenience, use the following program: WinSCP (windows) or Coda (for MacOS X), that allow you to work with files on the server using SFTP (SSH, same files only).

In the ServerName write ip address or server name.

Line IncludeOptional conf.d/*.conf transfer at the very end of the file.
And we add to it the main virtualhost:
< VirtualHost *: 80 > ServerName webmaster@server.ru ServerAdmin/var/www/html DocumentRoot 127.0.0.1

Then you need to run a simple script safe installation, which will remove some dangerous default settings and will complicate access to the system database. Start the interactive script:
# mysql_secure_installation
The system will ask the current root password. But because the system MySQL just installed, the password yet, so just press enter. Then you are asked whether you want to set a password, type Y, and then follow the instructions.
For all other questions, simply press enter.

Let’s connect and check

Install the php module for work with databases
# yum-y install php-mysql

Reserve. Check:
http://IP-адрес_сервера/mysqltest.php (after successful validation script, you may want to remove)
If the MySQL Server version was hatched, then continue.
7. configure the hosts in Apache.

Once we have verified that all of the major Web services we have work well, you can proceed to create directories of sites.
We will have this structure:
the sites directory is/home/
/home/site1.ru/— directory for a particular site
/home/site1.ru/www/-the files of this site
/home/site1.ru/logs/— logs of this site
/home/site1.ru/tmp/-temporary files of this site

And so, we create in/home/directory sites and each folder the logs, tmp, www.

The same file is created for each site from the directory/home/
After that, restart Apache:
CentOS: 6 # service httpd restart
CentOS 7: # systemctl restart httpd
If Apache does not start all of a sudden, you can always view the error log in/var/log/httpd/

Note:
If you encounter an error file or directory access, you must make sure that the file/etc/sysconfig/selinux to SELINUX is disabled, if not, restart the server and run the command # reboot.

Check:
To check it is not necessary to change the NS record of a domain, just edit the hosts file on the computer that you are configuring. In windows it usually lies in C:\Windows\System32\drivers\etc\ in nix systems in/etc/

Adding to the line:
192.168.1.5 site1.ru
Where 192.168.1.5 is the ip address of your server.
Next, create the/home/site1.ru/www/file index.html with any text.
Oktryvaem browser http://site1.ru/
If you see the content, then keep.
8. install and configure PhpMyAdmin (PMA)

To be manually. To do this, we will need a download manager wget.
If you don’t, then put:
# yum-y install wget
Go to http://www.phpmyadmin.net/home_page/downloads.php and copy the link to the latest version of PhpMyAdmin mul′tiâzyčnuû compressed .zip (at the moment it is http://sourceforge.net/projects/phpmyadmin/files/phpMyAdmin/4.2.8/phpMyAdmin-4.2.8-all-languages.zip).
Go to/var/www/html/:
# cd/var/www/html/
Download The PMA:
# wget http://sourceforge.net/projects/phpmyadmin/files/phpMyAdmin/4.2.8/phpMyAdmin-4.2.8-all-languages.zip
In a phpMyAdmin-4.2.8-all-languages.zip archive, unpack it:
# unzip phpMyAdmin-4.2.8-all-languages.zip
Rename the folder phpMyAdmin-4.2.8-all-languages in the pma:
mv phpMyAdmin-# 4.2.8-all languages-pma
Delete the phpMyAdmin-4.2.8-all-languages.zip file because it is no longer needed:
# rm phpMyAdmin-4.2.8-all-languages.zip

In theory, we have a fully working PhpMyAdmin should be available at the address: