Sponsor-Board.de

Normale Version: Apache2 Probleme
Du siehst gerade eine vereinfachte Darstellung unserer Inhalte. Normale Ansicht mit richtiger Formatierung.
Moin,

habe folgendes Problem, und zwar bekomme ich bei service apache2 restart/start/stop/reload mmer diesen Fehler.

Zudem funktioniert auch der Webserver nicht mehr, heißt mir wird meine Seite im Browser nicht angezeigt.

Das ist der Fehler:

Code:
Job for apache2.service failed. See 'systemctl status apache2.service' and 'journalctl -xn' for details.


Code:
● apache2.service - LSB: Apache2 web server
   Loaded: loaded (/etc/init.d/apache2)
  Drop-In: /lib/systemd/system/apache2.service.d
           └─forking.conf
   Active: failed (Result: exit-code) since Thu 2017-11-23 13:53:01 CET; 14min ago
  Process: 26547 ExecStop=/etc/init.d/apache2 stop (code=exited, status=0/SUCCESS)
  Process: 26525 ExecReload=/etc/init.d/apache2 reload (code=exited, status=1/FAILURE)
  Process: 26677 ExecStart=/etc/init.d/apache2 start (code=exited, status=1/FAILURE)

Nov 23 13:53:01 vmd22796.contaboserver.net apache2[26677]: Starting web server: apache2 failed!
Nov 23 13:53:01 vmd22796.contaboserver.net apache2[26677]: The apache2 configtest failed. ... (warning).
Nov 23 13:53:01 vmd22796.contaboserver.net apache2[26677]: Output of config test was:
Nov 23 13:53:01 vmd22796.contaboserver.net apache2[26677]: apache2: Syntax error on line 219 of /etc/apache2/apache2.conf: Could not open configuration file /etc/apache2/sites-enabled/mein.conf: No such file or directory
Nov 23 13:53:01 vmd22796.contaboserver.net apache2[26677]: Action 'configtest' failed.
Nov 23 13:53:01 vmd22796.contaboserver.net apache2[26677]: The Apache error log may have more information.
Nov 23 13:53:01 vmd22796.contaboserver.net systemd[1]: apache2.service: control process exited, code=exited status=1
Nov 23 13:53:01 vmd22796.contaboserver.net systemd[1]: Failed to start LSB: Apache2 web server.
Nov 23 13:53:01 vmd22796.contaboserver.net systemd[1]: Unit apache2.service entered failed state.

Zitat:
Hint: Some lines were ellipsized, use -l to show in full.


Einmal bitte das ganze ohne gekürzten Zeilen anzeigen lassen.

Zudem einmal bitte den Error Log von Apache.

Habs oben editiert Smile
Du hast irgendeine Config aktiviert die nicht gefunden werden kann.

Could not open configuration file /etc/apache2/sites-enabled/mein.conf: No such file or directory

Dalli schrieb:
Habs oben editiert Smile


Zitat:
apache2: Syntax error on line 219 of /etc/apache2/apache2.conf: Could not open configuration file /etc/apache2/sites-enabled/mein.conf: No such file or directory


Da steht eigentlich alles was du wissen musst. Solltest du dennoch Hilfe benötigen, kannst du ja mal deine Apache2 Conf posten. Aufjedenfall hast du in Zeile 219 auf .../mein.conf verwiesen, welche nicht existiert.

Okay, habe beide Dateien wieder erstellt.

Wenn ich nun mit

Code:
service apache2 reload

reloaden will kommt nur

Code:
Job for apache2.service failed. See 'systemctl status apache2.service' and 'journalctl -xn' for details.


Code:
● apache2.service - LSB: Apache2 web server
   Loaded: loaded (/etc/init.d/apache2)
  Drop-In: /lib/systemd/system/apache2.service.d
           └─forking.conf
   Active: failed (Result: exit-code) since Thu 2017-11-23 14:18:12 CET; 6min ago
  Process: 26547 ExecStop=/etc/init.d/apache2 stop (code=exited, status=0/SUCCESS)
  Process: 26525 ExecReload=/etc/init.d/apache2 reload (code=exited, status=1/FAILURE)
  Process: 26927 ExecStart=/etc/init.d/apache2 start (code=exited, status=1/FAILURE)

Nov 23 14:18:12 vmd22796.contaboserver.net apache2[26927]: Starting web server: apache2 failed!
Nov 23 14:18:12 vmd22796.contaboserver.net apache2[26927]: The apache2 configtest failed. ... (warning).
Nov 23 14:18:12 vmd22796.contaboserver.net apache2[26927]: Output of config test was:
Nov 23 14:18:12 vmd22796.contaboserver.net apache2[26927]: apache2: Syntax error on line 219 of /etc/apache2/apache2.conf: Syntax error on line 1 of /etc/apache2/sites-enabled/mein.conf: /etc/apache2/sites-enabled/mein.conf:1: <VirtualHost> was not closed.
Nov 23 14:18:12 vmd22796.contaboserver.net apache2[26927]: Action 'configtest' failed.
Nov 23 14:18:12 vmd22796.contaboserver.net apache2[26927]: The Apache error log may have more information.
Nov 23 14:18:12 vmd22796.contaboserver.net systemd[1]: apache2.service: control process exited, code=exited status=1
Nov 23 14:18:12 vmd22796.contaboserver.net systemd[1]: Failed to start LSB: Apache2 web server.
Nov 23 14:18:12 vmd22796.contaboserver.net systemd[1]: Unit apache2.service entered failed state.
Nov 23 14:18:18 vmd22796.contaboserver.net systemd[1]: Unit apache2.service cannot be reloaded because it is inactive.

Der <virtualhost> tag wurde in „mein.conf“ nicht geschlossen.
Das sind die zwei Dateien:

mein.conf

Code:
<VirtualHost *:80>

ServerName mein.exahost.de

ServerAdmin [email protected]



DocumentRoot /var/www/html/mein



<Directory /var/www/html/mein

Options Indexes FollowSymLinks MultiViews

AllowOverride All

</Directory>


s1.conf

Code:
<VirtualHost *:80>

ServerName s1.exahost.de

ServerAdmin [email protected]



DocumentRoot /var/www/html/s1



<Directory /var/www/html/s1

Options Indexes FollowSymLinks MultiViews

AllowOverride All

</Directory>

Dalli schrieb:
Das sind die zwei Dateien:

mein.conf

Code:
<VirtualHost *:80>

ServerName mein.exahost.de

ServerAdmin [email protected]



DocumentRoot /var/www/html/mein



<Directory /var/www/html/mein

Options Indexes FollowSymLinks MultiViews

AllowOverride All

</Directory>


Ja, wie gesagt. der virtualhost Tag wurde nicht geschlossen.

Mit
"<VirtualHost *:80>" hast du diesen erstellt, dieser muss mit
"</VirtualHost>" am Ende der Datei auch wieder geschlossen werden.

Zudem gehört:
"<Directory /var/www/html/mein"
zu
"<Directory /var/www/html/mein/>"

Und
"DocumentRoot /var/www/html/mein"
zu
"DocumentRoot /var/www/html/mein/"

Natürlich bei beiden Vhosts anwenden.

Jetzt bekomme ich diese Meldungen:

Code:
● apache2.service - LSB: Apache2 web server
   Loaded: loaded (/etc/init.d/apache2)
  Drop-In: /lib/systemd/system/apache2.service.d
           └─forking.conf
   Active: failed (Result: exit-code) since Thu 2017-11-23 14:18:12 CET; 30min ago
  Process: 26547 ExecStop=/etc/init.d/apache2 stop (code=exited, status=0/SUCCESS)
  Process: 26525 ExecReload=/etc/init.d/apache2 reload (code=exited, status=1/FAILURE)
  Process: 26927 ExecStart=/etc/init.d/apache2 start (code=exited, status=1/FAILURE)

Nov 23 14:18:12 vmd22796.contaboserver.net apache2[26927]: The apache2 configtest failed. ... (warning).
Nov 23 14:18:12 vmd22796.contaboserver.net apache2[26927]: Output of config test was:
Nov 23 14:18:12 vmd22796.contaboserver.net apache2[26927]: apache2: Syntax error on line 219 of /etc/apache2/apache2.conf: Syntax error on line 1 of /etc/apache2/sites-enabled/mein.conf: /etc/apache2/sites-enabled/mein.conf:1: <VirtualHost> was not closed.
Nov 23 14:18:12 vmd22796.contaboserver.net apache2[26927]: Action 'configtest' failed.
Nov 23 14:18:12 vmd22796.contaboserver.net apache2[26927]: The Apache error log may have more information.
Nov 23 14:18:12 vmd22796.contaboserver.net systemd[1]: apache2.service: control process exited, code=exited status=1
Nov 23 14:18:12 vmd22796.contaboserver.net systemd[1]: Failed to start LSB: Apache2 web server.
Nov 23 14:18:12 vmd22796.contaboserver.net systemd[1]: Unit apache2.service entered failed state.
Nov 23 14:18:18 vmd22796.contaboserver.net systemd[1]: Unit apache2.service cannot be reloaded because it is inactive.
Nov 23 14:47:49 vmd22796.contaboserver.net systemd[1]: Unit apache2.service cannot be reloaded because it is inactive.



mein.conf

Code:
<VirtualHost *:80>

ServerName mein.exahost.de

ServerAdmin [email protected]



DocumentRoot /var/www/html/mein/



<Directory /var/www/html/mein/>

Options Indexes FollowSymLinks MultiViews

AllowOverride All

</Directory>
</VirtualHost>



s1.conf

Code:
<VirtualHost *:80>

ServerName s1.exahost.de

ServerAdmin [email protected]



DocumentRoot /var/www/html/s1/



<Directory /var/www/html/s1/>

Options Indexes FollowSymLinks MultiViews

AllowOverride All

</Directory>
</VirtualHost>

Seiten: 1 2
Referenz-URLs