Error restarting apache2 after server upgrade

AH00526: Syntax error on line 2 of /etc/apache2/sites-enabled/cp2.joel.co.in.conf:
Invalid command 'SuexecUserGroup', perhaps misspelled or defined by a module not included in the server configuration

Fix:

a2enmod suexec
Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration

Fix:

a2enmod rewrite
AH00526: Syntax error on line 89 of /etc/apache2/apache2.conf:
Invalid command 'LockFile', perhaps misspelled or defined by a module not included in the server configuration

Fix:
Replace the line in /etc/apache2/apache2.conf:

LockFile ${APACHE_LOCK_DIR}/accept.lock

By:

Mutex file:${APACHE_LOCK_DIR} default
[....] Restarting web server: apache2AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using ks4.droidzone.in. Set the 'ServerName' directive globally to suppress this message

Fix:
Add the following line to the end of /etc/apache2/apache2.conf:

ServerName localhost

Restart apache after the fixes.


You are reading this post on Joel G Mathew’s tech blog. Joel's personal blog is the Eyrie, hosted here.