• This forum has a zero tolerance policy regarding spam. If you register here to publish advertising, your user account will be deleted without further questions.

Apache update zerschießt config

Lockslay

New Member
Hallo zusammen,

ich habe nach dieser Anleitung [1] mein System auf Debian Jessie umgestellt. Natürlich habe ich die Einträge in Jessie geändert. :wink:
Bis auf ein Problem mit dem Apache Server lief das Update gut durch.
Der Apache Server Startete nicht, als ich diesem mit
Code:
/etc/init.d/apache2 start
starten wollte erhielt ich folgende Meldung:

Code:
[....] Starting apache2 (via systemctl): apache2.serviceJob for apache2.service failed. See 'systemctl status apache2.service' and 'journalctl -xn' for details.
 failed!

systemctl status httpd.service ergibt:

Code:
systemctl status httpd.service 
● httpd.service
   Loaded: not-found (Reason: No such file or directory)
   Active: inactive (dead)
Das macht mich schon stutzig ?

journalctl -xe

Code:
Apr 03 21:05:01 debianserver CRON[3120]: pam_unix(cron:session): session closed 
Apr 03 21:05:01 debianserver CRON[3121]: pam_unix(cron:session): session closed 
Apr 03 21:05:02 debianserver CRON[3119]: pam_unix(cron:session): session closed 
Apr 03 21:06:06 debianserver apache2[3154]: Starting web server: apache2 failed!
Apr 03 21:06:06 debianserver apache2[3154]: The apache2 configtest failed. ... (
Apr 03 21:06:06 debianserver apache2[3154]: Output of config test was:
Apr 03 21:06:06 debianserver apache2[3154]: AH00526: Syntax error on line 82 of 
Apr 03 21:06:06 debianserver apache2[3154]: Invalid command 'RewriteLog', perhap
Apr 03 21:06:06 debianserver apache2[3154]: Action 'configtest' failed.
Apr 03 21:06:06 debianserver apache2[3154]: The Apache error log may have more i
Apr 03 21:06:06 debianserver systemd[1]: apache2.service: control process exited
Apr 03 21:06:06 debianserver systemd[1]: Failed to start LSB: Apache2 web server
-- Subject: Unit apache2.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit apache2.service has failed.
-- 
-- The result is failed.
Apr 03 21:06:06 debianserver systemd[1]: Unit apache2.service entered failed sta
Apr 03 21:09:01 debianserver CRON[3211]: pam_unix(cron:session): session opened 
Apr 03 21:09:01 debianserver CRON[3212]: (root) CMD (  [ -x /usr/lib/php5/sessio
Apr 03 21:09:03 debianserver CRON[3211]: pam_unix(cron:session): session closed 
lines 1354-1376/1376 (END)
Apr 03 21:05:01 debianserver CRON[3120]: pam_unix(cron:session): session closed for user root
Apr 03 21:05:01 debianserver CRON[3121]: pam_unix(cron:session): session closed for user root
Apr 03 21:05:02 debianserver CRON[3119]: pam_unix(cron:session): session closed for user root
Apr 03 21:06:06 debianserver apache2[3154]: Starting web server: apache2 failed!
Apr 03 21:06:06 debianserver apache2[3154]: The apache2 configtest failed. ... (warning).
Apr 03 21:06:06 debianserver apache2[3154]: Output of config test was:
Apr 03 21:06:06 debianserver apache2[3154]: AH00526: Syntax error on line 82 of /etc/apache2/apache2.conf:
Apr 03 21:06:06 debianserver apache2[3154]: Invalid command 'RewriteLog', perhaps misspelled or defined by a module not included in the server configuration
Apr 03 21:06:06 debianserver apache2[3154]: Action 'configtest' failed.
Apr 03 21:06:06 debianserver apache2[3154]: The Apache error log may have more information.
Apr 03 21:06:06 debianserver systemd[1]: apache2.service: control process exited, code=exited status=1
Apr 03 21:06:06 debianserver systemd[1]: Failed to start LSB: Apache2 web server.
-- Subject: Unit apache2.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit apache2.service has failed.
-- 
-- The result is failed.
Apr 03 21:06:06 debianserver systemd[1]: Unit apache2.service entered failed state.
Apr 03 21:09:01 debianserver CRON[3211]: pam_unix(cron:session): session opened for user root by (uid=0)
Apr 03 21:09:01 debianserver CRON[3212]: (root) CMD (  [ -x /usr/lib/php5/sessionclean ] && /usr/lib/php5/sessionclean)
Apr 03 21:09:03 debianserver CRON[3211]: pam_unix(cron:session): session closed for user root
Hier ist das auffällig:
Code:
Apr 03 21:06:06 debianserver apache2[3154]: AH00526: Syntax error on line 82 of /etc/apache2/apache2.conf:
Apr 03 21:06:06 debianserver apache2[3154]: Invalid command 'RewriteLog', perhaps misspelled or defined by a module not
Die Zeile 82 der /etc/apache2/apache2.conf zeigt das :RewriteLog /var/log/apache2/rewrite.log

So bevor ich jetzt etwas falsch mache würde ich euch um Euren Rat bitte.
Wie bekomme ich eine Lauffähige apache conf Version hin?

Gruß
Lockslay

[1]https://www.howtoforge.com/how-to-upgrade-debian-squeeze-to-wheezy
 
Hallo,

danke für die schnelle Antwort.

ich habe in der
/etc/apache2/apache2.conf

diese Zeilen gefunden und Kommentiert

Code:
  #htaccess
    # RewriteEngine on
    # RewriteLog /var/log/apache2/rewrite.log
    #RewriteLogLevel 3
Datei gespeichert und den Apache mit
/etc/init.d/apache2 restart

Code:
[....] Restarting apache2 (via systemctl): apache2.serviceJob for apache2.service failed. See 'systemctl status apache2.service' and 'journalctl -xn' for details.
 failed!

leider ohne Erfolg, habe ich da was vergessen ??

Gruß
Lockslay
 
Falls danach irgendwelche Rewrite-Regeln kommen, darfst du die Zeile
Code:
RewriteEngine On
nicht auskommentieren (die gibt es noch und wird auch zum Aktiveren benötigt). Bemängelt wurde ja nur das RewriteLog.
Ansonsten ins Log schauen, was jetzt für Probleme angezeigt werden und die Konfig entsprechend korrigieren - Jessie bringt nun mal eine neuere Apache-Version mit, da gibt es ein paar Abweichungen.
 
Was steht denn nun im Log wenn der Apache nicht startet? Das war bestimmt nicht der einzige Fehler.
 
Hallo,

habe hier die error.log.1
von meinem Apache Server, leider habe ich keine aktuellen Logs gefunden:

Code:
[Sun Mar 29 08:20:47 2015] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Sun Mar 29 08:20:47 2015] [warn] RSA server certificate CommonName (CN) `https://.dyndns.org/owncloud' does NOT match server name!?
[Sun Mar 29 08:20:47 2015] [notice] Apache/2.2.22 (Debian) DAV/2 PHP/5.4.39-0+deb7u2 mod_ssl/2.2.22 OpenSSL/1.0.1e configured -- resuming normal operations
[Sun Mar 29 09:57:46 2015] [error] [client 85.214.159.5] File does not exist: /var/www/admin
[Mon Mar 30 02:34:48 2015] [error] [client 188.132.220.138] File does not exist: /var/www/vtigercrm
[Mon Mar 30 20:15:15 2015] [error] [client 52.11.79.78] Client sent malformed Host header
[Tue Mar 31 14:23:53 2015] [error] [client 188.132.220.138] File does not exist: /var/www/vtigercrm
[Wed Apr 01 17:16:52 2015] [error] [client 109.91.225.68] client denied by server configuration: /var/www/owncloud/remote.php
[Wed Apr 01 17:16:52 2015] [error] [client 109.91.225.68] client denied by server configuration: /var/www/owncloud/remote.php
[Wed Apr 01 18:22:11 2015] [error] [client 109.91.225.68] File does not exist: /var/www/favicon.ico
[Wed Apr 01 18:22:11 2015] [error] [client 109.91.225.68] File does not exist: /var/www/favicon.ico
[Wed Apr 01 20:31:40 2015] [error] [client 109.91.225.68] client denied by server configuration: /var/www/owncloud/remote.php
[Wed Apr 01 20:31:40 2015] [error] [client 109.91.225] client denied by server configuration: /var/www/owncloud/remote.php
[Thu Apr 02 02:12:22 2015] [error] [client 64.14.99.2] File does not exist: /var/www/vtigercrm
[Fri Apr 03 19:14:56 2015] [notice] caught SIGTERM, shutting down
[Fri Apr 03 19:14:57 2015] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Fri Apr 03 19:14:57 2015] [warn] RSA server certificate CommonName (CN) `https://.dyndns.org/owncloud' does NOT match server name!?
PHP Deprecated:  Comments starting with '#' are deprecated in /etc/php5/apache2/conf.d/ming.ini on line 1 in Unknown on line 0
[Fri Apr 03 19:15:00 2015] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Fri Apr 03 19:15:00 2015] [warn] RSA server certificate CommonName (CN) `https://.dyndns.org/owncloud' does NOT match server name!?
[Fri Apr 03 19:15:00 2015] [notice] Apache/2.2.22 (Debian) DAV/2 PHP/5.4.39-0+deb7u2 mod_ssl/2.2.22 OpenSSL/1.0.1k configured -- resuming normal operations
[Fri Apr 03 19:19:24 2015] [notice] caught SIGTERM, shutting down
[Fri Apr 03 19:19:25 2015] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Fri Apr 03 19:19:25 2015] [warn] RSA server certificate CommonName (CN) `https://.dyndns.org/owncloud' does NOT match server name!?
PHP Deprecated:  Comments starting with '#' are deprecated in /etc/php5/apache2/conf.d/ming.ini on line 1 in Unknown on line 0
[Fri Apr 03 19:19:26 2015] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Fri Apr 03 19:19:26 2015] [warn] RSA server certificate CommonName (CN) `https:///owncloud' does NOT match server name!?
[Fri Apr 03 19:19:26 2015] [notice] Apache/2.2.22 (Debian) DAV/2 PHP/5.4.39-0+deb7u2 mod_ssl/2.2.22 OpenSSL/1.0.1k configured -- resuming normal operations
[Fri Apr 03 20:52:26 2015] [notice] caught SIGTERM, shutting down

Wenn ich weiter Logs veröffentlichen soll, nur raus mit den Wünschen.

Gruß
Lockslay
 
Hallo

Code:
 apache2 -t
[Sat Apr 04 12:09:41.770374 2015] [core:warn] [pid 14198] AH00111: Config variable ${APACHE_LOCK_DIR} is not defined
[Sat Apr 04 12:09:41.770620 2015] [core:warn] [pid 14198] AH00111: Config variable ${APACHE_PID_FILE} is not defined
[Sat Apr 04 12:09:41.770845 2015] [core:warn] [pid 14198] AH00111: Config variable ${APACHE_RUN_USER} is not defined
[Sat Apr 04 12:09:41.770916 2015] [core:warn] [pid 14198] AH00111: Config variable ${APACHE_RUN_GROUP} is not defined
[Sat Apr 04 12:09:41.771098 2015] [core:warn] [pid 14198] AH00111: Config variable ${APACHE_LOG_DIR} is not defined
[Sat Apr 04 12:09:41.905297 2015] [core:warn] [pid 14198] AH00111: Config variable ${APACHE_LOCK_DIR} is not defined
[Sat Apr 04 12:09:41.908430 2015] [core:warn] [pid 14198] AH00111: Config variable ${APACHE_RUN_DIR} is not defined
[Sat Apr 04 12:09:41.911930 2015] [core:warn] [pid 14198] AH00111: Config variable ${APACHE_LOG_DIR} is not defined
[Sat Apr 04 12:09:41.912095 2015] [core:warn] [pid 14198] AH00111: Config variable ${APACHE_LOG_DIR} is not defined
AH00526: Syntax error on line 80 of /etc/apache2/apache2.conf:
Invalid command 'htaccess', perhaps misspelled or defined by a module not included in the server configuration

Wobei 80 of /etc/apache2/apache2.conf diese ist:

Code:
htaccess
RewriteEngine on
RewriteLog /var/log/apache2/rewrite.log
Diese hatte ich aus und kommentiert laufen lassen. Ohne Unterschied.

Gruß Lockslay
#RewriteLogLevel 3
 
Invalid command 'htaccess', perhaps misspelled or defined by a module not included in the server configuration
Steht doch eindeutig da, was Apache an der config nicht gefällt. Die Direktive "htaccess" gibt es AFAIK so nicht.
 
Mit apachectl -t gehts auch statt apache2 -t, dann stimmen auch die Umgebungsvariablen.

In der /etc/apache2/apache2.conf stand niemals vorher als Direktive htaccess drin.
Ich hab in meinem Jessie nachgesehen.

Das muss du hinein geschrieben haben.
 
Last edited by a moderator:
Hallo zusammen,

nun Gut die htaccess Einträge kann ich nicht mehr nachvollziehen, ob ich die Eingetragen habe oder nicht, die frage stellt sich nur was das ändert.
Auch wenn ich die ganzen Zeile lösche und den Server neu Starte bleibt die Fehlermeldung :confused:

/etc/init.d/apache2 start
[....] Starting apache2 (via systemctl): apache2.serviceJob for apache2.service failed. See 'systemctl status apache2.service' and 'journalctl -xn' for details.
failed!

Wenn es wirklich nur an dem htaccess Eintrag liegen würde müsste der Apache jetzt doch wieder laufen.
Warum macht er das nur nicht.

Hilfe eine Standart apche2 config Datei vielleicht ?

Gruß
Lockslay
 
Last edited by a moderator:
Vielleicht sind irgendwelche Sonder-/Steuerzeichen in der Config, die den ConfigParser stören. Du wirst wohl so lange den Server starten und Logs lesen müssen, bis du alle ungültigen Direktiven entfernt hast. Sollten irgendwo Klammern vorkommen (wäre mir jetzt nicht bewusst), kann auch eine fehlende Klammer dafür verantwortlich sein.
 
Hallo zusammen,

ich bin nun einen kleinen Schritt weiter, der Apache startet wieder.
apache2 -t
Code:
[Sat Apr 04 12:09:41.770374 2015] [core:warn] [pid 14198] AH00111: Config variable ${APACHE_LOCK_DIR} is not defined
[Sat Apr 04 12:09:41.770620 2015] [core:warn] [pid 14198] AH00111: Config variable ${APACHE_PID_FILE} is not defined
[Sat Apr 04 12:09:41.770845 2015] [core:warn] [pid 14198] AH00111: Config variable ${APACHE_RUN_USER} is not defined
[Sat Apr 04 12:09:41.770916 2015] [core:warn] [pid 14198] AH00111: Config variable ${APACHE_RUN_GROUP} is not defined
[Sat Apr 04 12:09:41.771098 2015] [core:warn] [pid 14198] AH00111: Config variable ${APACHE_LOG_DIR} is not defined
[Sat Apr 04 12:09:41.905297 2015] [core:warn] [pid 14198] AH00111: Config variable ${APACHE_LOCK_DIR} is not defined
[Sat Apr 04 12:09:41.908430 2015] [core:warn] [pid 14198] AH00111: Config variable ${APACHE_RUN_DIR} is not defined
[Sat Apr 04 12:09:41.911930 2015] [core:warn] [pid 14198] AH00111: Config variable ${APACHE_LOG_DIR} is not defined
[Sat Apr 04 12:09:41.912095 2015] [core:warn] [pid 14198] AH00111: Config variable ${APACHE_LOG_DIR} is not defined
AH00526: Syntax error on line 134 of /etc/apache2/apache2.conf:
134 of /etc/apache2/apache2.conf ist diese:
Code:
# The accept serialization lock file MUST BE STORED ON A LOCAL DISK.
#
LockFile ${APACHE_LOCK_DIR}/accept.lock
das habe ich geändert in #LockFile ${APACHE_LOCK_DIR}/accept.lock Datei gespeichert und apache gestartet, und er läuft :THX: ..... nur mit der
500 Internet Server Error Meldung:
Code:
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log

Was kann das nun sein ?
Gruß Lockslay
 
LockFile wird ebenfalls in dem Link von danton angesprochen.

500 kann alles sein, gerne der PHP-, CGI-, Perl- etc. Wrapper, mod_rewrite od. aber sonstige Einstellungen. -> Log
 
Last edited by a moderator:
Hallo zusammen,

so ich habe den Fehler gefunden. Wie beschrieben habe ich diese Zeilen Kommentiert:

#
# The accept serialization lock file MUST BE STORED ON A LOCAL DISK.
#
#LockFile ${APACHE_LOCK_DIR}/accept.lock
Danach hatte ich einen 500 Internet Server Error Meldung diese konnte ich laut Log auf eine .htaccess zurückführen, als ich diese überarbeitet hatte lief alles wieder.
Besten Dank für die nette und schnelle Hilfe.

@marce kann man hier ja raus lassen ;-)

Gruß
Lockslay
 
Back
Top