PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : Fehler beim starten des Apache unter debian whezzy



Coolzero
04.09.15, 21:35
Hallo, beim starten des Apache kommt unter whezzy diese Meldung:



sudo /etc/init.d/apache2 start[FAIL] Starting web server: apache2 failed!
[warn] The apache2 configtest failed. ... (warning).
Output of config test was:
apache2: Syntax error on line 265 of /etc/apache2/apache2.conf: Could not open configuration file /etc/apache2/conf.d/: No such file or directory
Action 'configtest' failed.
The Apache error log may have more information.




Muss seit dem letzten system Update so sein, was kann ich tun?

Danke?

nopes
04.09.15, 21:51
Prüfen was genau Zeile 265 macht und ins "Apache error log" schauen - üblicherweise in /var/log/apache2 zu finden.

Ins blau geraten:
Ich habe was im Hinterkopf, nämlich, das die gar nicht glücklich über dieses Verzeichnis sind und es in Zukunft deaktivieren wollen, vermutlich ist die Zukunft nun Gegenwart - in der Standard Debian Config Datei steht ein entsprechender Kommentar; wie erwähnt ist es eine Mutmaßung.

marce
04.09.15, 22:40
naja, die Meldung ist eigentlich mehr als eindeutig - da wird ein Verzeichnis includiert, welches nicht vorhanden ist.

Coolzero
05.09.15, 13:56
Hi, in 265 steht:

Include conf.d/

Ich hab in der zwischenzeit das System mal aktualisiert, aber apache startet immer noch nicht, kommt allerdings beim starten jetzt diese Meldung:


sudo /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!



systemctl status apache2.service -l
● apache2.service - LSB: Apache2 web server
Loaded: loaded (/etc/init.d/apache2)
Active: failed (Result: exit-code) since Sat 2015-09-05 14:52:02 CEST; 39s ago
Process: 2733 ExecStart=/etc/init.d/apache2 start (code=exited, status=1/FAILURE)

Sep 05 14:52:02 cubie apache2[2733]: Starting web server: apache2 failed!
Sep 05 14:52:02 cubie apache2[2733]: The apache2 configtest failed. ... (warning).
Sep 05 14:52:02 cubie apache2[2733]: Output of config test was:
Sep 05 14:52:02 cubie apache2[2733]: apache2: Syntax error on line 265 of /etc/apache2/apache2.conf: Could not open configuration file /etc/apache2/conf.d/: No such file or directory
Sep 05 14:52:02 cubie apache2[2733]: Action 'configtest' failed.
Sep 05 14:52:02 cubie apache2[2733]: The Apache error log may have more information.
Sep 05 14:52:02 cubie systemd[1]: apache2.service: control process exited, code=exited status=1
Sep 05 14:52:02 cubie systemd[1]: Failed to start LSB: Apache2 web server.
Sep 05 14:52:02 cubie systemd[1]: Unit apache2.service entered failed state.


journalctl -xn
-- Logs begin at Sat 2015-09-05 14:41:25 CEST, end at Sat 2015-09-05 14:53:02 CEST. --
Sep 05 14:53:02 cubie apache2[2964]: Starting web server: apache2 failed!
Sep 05 14:53:02 cubie apache2[2964]: The apache2 configtest failed. ... (warning).
Sep 05 14:53:02 cubie apache2[2964]: Output of config test was:
Sep 05 14:53:02 cubie apache2[2964]: apache2: Syntax error on line 265 of /etc/apache2/apache2.conf: Could not open configuration file /etc/apache2/conf.d/: No such file or
Sep 05 14:53:02 cubie apache2[2964]: Action 'configtest' failed.
Sep 05 14:53:02 cubie apache2[2964]: The Apache error log may have more information.
Sep 05 14:53:02 cubie systemd[1]: apache2.service: control process exited, code=exited status=1
Sep 05 14:53:02 cubie 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.
Sep 05 14:53:02 cubie systemd[1]: Unit apache2.service entered failed state.
Sep 05 14:53:02 cubie CRON[2918]: pam_unix(cron:session): session closed for user root


unter /var/log/apache2 gibt es keinen Error Log aus den letzten Tagen..............

BetterWorld
05.09.15, 14:38
apache2: Syntax error on line 265 of /etc/apache2/apache2.conf: Could not open configuration file /etc/apache2/conf.d/: No such file or
Ich verwende keinen Indianer.
Aber als erstes würde ich schlicht einen * in Zeile 265 anfügen, oder stattdessen den trailing Slash entfernen.

nopes
05.09.15, 17:49
Ne der Slash hinten passt, oder passte zu mindestens mal:
foo@bar:/etc/apache2$ cat apache2.conf | grep conf.d -B 4
# Include of directories ignores editors' and dpkg's backup files,
# see README.Debian for details.

# Include generic snippets of statements
Include conf.d/
foo@bar:/etc/apache2$ zcat /usr/share/doc/apache2/README.Debian.gz | grep conf.d -A 10
conf.d/

Files in this directory are included by this line in
apache2.conf:

# Include generic snippets of statements
Include /etc/apache2/conf.d

This is a good place to add additional configuration
directives. Packages should not use configuration
files that start with 'local-' or end with '.local'.
The local administrator can use these filenames to make
sure that there are no conflicts with files provided by
packages.

If the local administrator is not comfortable with packages
activating their config files by default, it is possible
to change the 'Include /etc/apache2/conf.d/' in apache2.conf
into 'Include /etc/apache2/conf.d.enabled/' and create that
directory. He can then put symlinks to the files in conf.d
which he wants to enable into conf.d.enabled.

Also prüfe, ob sich bei dir was an der README.Debian getan hat.
Prüfe außerdem, ob es das Verzeichnis überhaupt gibt und wenn ja, ob Apache darauf überhaupt zugreifen darf, bei mir darf es das nur lesend
foo@bar:/etc/apache2$ ls -la | grep conf.d
drwxr-xr-x 2 root root 4096 Feb 25 2014 conf.d
Sollte das Verzeichnis nicht vorhanden sein, kannst du es auch einfach anlegen, aber eigentlich solltest du dann erst mal versuchen zu verstehen warum, also ein bisschen in der Doku wälzen.

Coolzero
06.09.15, 09:51
Hi,
also das Verzeichnis fehlte, ich habs mal angelegt, aber der Fehler bleibt


ls -la | grep conf.d
-rw-r--r-- 1 root root 7115 Feb 1 2015 apache2.conf.dpkg-dist
drwxr-xr-x 2 root root 4096 Sep 6 10:40 conf.d



Habs jetzt so hinbekommen:


sudo mkdir conf.d
sudo touch httpd.conf
sudo vi apache2.conf
und dann in der apache2.conf
die Zeile:

LockFile ${APACHE_LOCK_DIR}/accept.lock
durch

Mutex file:${APACHE_LOCK_DIR} default

ersetz, und siehe da, er lässt sich ohne Fehler starte.

Danke für eure Hilfe

Allaman
06.09.15, 13:38
siehe auch http://httpd.apache.org/docs/2.4/upgrading.html


Directives AcceptMutex, LockFile, RewriteLock, SSLMutex, SSLStaplingMutex, and WatchdogMutexPath have been replaced with a single Mutex directive. You will need to evaluate any use of these removed directives in your 2.2 configuration to determine if they can just be deleted or will need to be replaced using Mutex.