Got error from apache after upgraded Debian to Jessie (8.x)

I upgraded my Debian server to Jessie yesterday, due to I didn’t update all the configs, I found some errors, and got to fix them.

Error message:

Starting web server: apache2 failed!
The apache2 configtest failed. … (warning).
Output of config test was:
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
Action ‘configtest’ failed.
The Apache error log may have more information.

Solution:

Edit /etc/apache2/apache2.conf, replace line 89:
LockFile ${APACHE_LOCK_DIR}/accept.lock
with this line:
Mutex file:${APACHE_LOCK_DIR} default

Another error:

Starting web server: apache2 failed!
The apache2 configtest failed. … (warning).
Output of config test was:
AH00526: Syntax error on line 17 of /etc/apache2/sites-enabled/000-default.conf:
Either all Options must start with + or -, or no Option may.

Action ‘configtest’ failed.
The Apache error log may have more information.

So just add symbol + for the options without prefix symbol and it works again.

發表迴響