Baran Topal

Baran Topal


May 2024
M T W T F S S
« Feb    
 12345
6789101112
13141516171819
20212223242526
2728293031  

Categories


Backup of apache, php and mysql settings

baranbaran

Lately, I needed to move my server setup including code files, database dumps and apache settings. While it is always hard to migrate settings in IIS, it is relatively straightforward for apache and mysql.

All you need to do for apache is checking out the httpd.conf file, which possibly resides in the apache folders. The path depends on the linux distro that you are using.

In ubuntu, I needed to backup apache2.conf file which shall be under /etc/apache2. I also need to have the backup 000-default.conf which shall be under /etc/apache2/sites-available

This configuration file shall have the virtualhost information as follows:


ServerAdmin barantopal@barantopal.com
ServerName www.barantopal.com
ServerAlias barantopal.com *.barantopal.com
DocumentRoot /var/www/html/barantopal
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined

For mysql, the name may differ, and the location may not be obvious to find:
http://dev.mysql.com/doc/refman/5.7/en/option-files.html

Finally, don’t forget your php.ini if you are using php on your apache hosted web sites.
http://php.net/manual/en/ini.php