We have recently installed CentOS 6 and trying to configure Apache virtual hosts to host several domains / websites without any control panel like cPanel.
But after editing /etc/httpd/conf/httpd.conf file for virtual hosts, Apache was fail to start with following error message:
[wpfmb type=’error’ theme=2]Starting httpd: Syntax error on line 1008 of /etc/httpd/conf/httpd.conf:CustomLog takes two or three arguments, a file name, a custom log format string or format name, and an optional “env=” clause (see docs)[/wpfmb]
To resolve this error, follow the steps below:
SSh into your server as an root user
Open /etc/httpd/conf/httpd.conf file in any text editor like nano.
Go to the line which is throughing error message. It Should be something like:
Change above line to below line.
CustomLog /var/www/domain.com/requests.log common
Save the file and exit the editor.
Start Apache / http using below command:
service httpd start
Done!! Apache should run now.