Sponsor-Board.de
Thema geschlossen  Thema schreiben 

apache2: "AH00526: syntax fehler"

Verfasser Nachricht

Beiträge: 182
Bewertung: 2
Registriert seit: May 2015
Status: offline


Beitrag: #1
apache2: "AH00526: syntax fehler"

Hallo,
undzwar startet mein Apache2 nicht, wenn ich:
<Directory /var/www/>
Options -Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
in /etc/apache2/sites-enabled/000-default.conf einbaue, dann kommt dann folgende meldung:

Code:
-- Logs begin at Tue 2017-10-24 11:28:52 EDT, end at Mon 2017-11-27 09:46:08 EST. --
Nov 27 09:46:08 vps systemd[1]: Reloading LSB: Apache2 web server.
-- Subject: Unit apache2.service has begun with reloading its configuration
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit apache2.service has begun with reloading its configuration
Nov 27 09:46:08 vps apache2[30256]: Reloading web server: apache2 failed!
Nov 27 09:46:08 vps apache2[30256]: The apache2 configtest failed. Not doing anything. ... (warning).
Nov 27 09:46:08 vps apache2[30256]: Output of config test was:
Nov 27 09:46:08 vps apache2[30256]: AH00526: Syntax error on line 15 of /etc/apache2/sites-enabled/000-default.conf:
Nov 27 09:46:08 vps apache2[30256]: Either all Options must start with + or -, or no Option may.
Nov 27 09:46:08 vps apache2[30256]: Action 'configtest' failed.
Nov 27 09:46:08 vps apache2[30256]: The Apache error log may have more information.
Nov 27 09:46:08 vps systemd[1]: apache2.service: control process exited, code=exited status=1
Nov 27 09:46:08 vps systemd[1]: Reload failed for LSB: Apache2 web server.
-- Subject: Unit apache2.service has finished reloading its configuration
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit apache2.service has finished reloading its configuration
--
-- The result is failed.


Komplette 000-default.conf datei:

Code:
<VirtualHost *:80>
        # The ServerName directive sets the request scheme, hostname and port that
        # the server uses to identify itself. This is used when creating
        # redirection URLs. In the context of virtual hosts, the ServerName
        # specifies what hostname must appear in the request's Host: header to
        # match this virtual host. For the default virtual host (this file) this
        # value is not decisive as it is used as a last resort host regardless.
        # However, you must set it for any further virtual host explicitly.
        #ServerName www.example.com

        ServerAdmin webmaster@localhost
        DocumentRoot /var/www

<Directory /var/www/>
Options -Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>

        # Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
        # error, crit, alert, emerg.
        # It is also possible to configure the loglevel for particular
        # modules, e.g.
        #LogLevel info ssl:warn

        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined

        # For most configuration files from conf-available/, which are
        # enabled or disabled at a global level, it is possible to
        # include a line for only one particular virtual host. For example the
        # following line enables the CGI configuration for this host only
        # after it has been globally disabled with "a2disconf".
        #Include conf-available/serve-cgi-bin.conf
</VirtualHost>


Ich hoffe ihr könnt mir helfen, also ich möchte dass Index of / usw. nicht angezeigt wird also kein Verzeichnislisting.


Homepage: LackZ.de
Teamspeak: LackZ.de
[Link: Registrierung erforderlich]

27.11.2017 15:55
 
Webseite des Benutzers besuchen Alle Beiträge dieses Benutzers finden

 
Beiträge: Keine Angabe
Registriert seit: Keine Angabe
Status: Unbekannt


Beitrag: #2
RE: apache2: "AH00526: syntax fehler"

Hallo,

bitte ändere doch mal die Zeile 15 (Options -Indexes FollowSymLinks MultiViews) in folgende:

Options Indexes FollowSymLinks MultiViews

Viele Grüße

27.11.2017 16:36
 

Beiträge: 159
Bewertung: 22
Registriert seit: Nov 2016
Status: offline


Beitrag: #3
RE: apache2: "AH00526: syntax fehler"

Apache erlaubt keinen Mix zwischen "+ - und garnichts." bei den Options.

Du hast aber "-" mit "garnichts" vermischt:
Options -Indexes FollowSymLinks MultiViews

->
Options Indexes FollowSymLinks MultiViews
würde funktionieren.




Günstige Domains, Webspaces, Teamspeak 3 Server
Besuchen Sie [Link: Registrierung erforderlich]

27.11.2017 16:39
 
Webseite des Benutzers besuchen Alle Beiträge dieses Benutzers finden

Beiträge: 37
Bewertung: 0
Registriert seit: Apr 2015
Status: offline


Beitrag: #4
RE: apache2: "AH00526: syntax fehler"

so wäre es aus

Code:
<Directory />
    Options FollowSymLinks
    AllowOverride None
</Directory>


und so wäre es an

Code:
<Directory /www/somefolder>
    Options Indexes FollowSymLinks
    AllowOverride None
</Directory>


wenn ich es richtig im kopf noch habe

27.11.2017 16:42
 
Alle Beiträge dieses Benutzers finden

Beiträge: 182
Bewertung: 2
Registriert seit: May 2015
Status: offline


Beitrag: #5
RE: apache2: "AH00526: syntax fehler"

Alles klar, danke hat sich geklärt!


Homepage: LackZ.de
Teamspeak: LackZ.de
[Link: Registrierung erforderlich]

27.11.2017 16:58
 
Webseite des Benutzers besuchen Alle Beiträge dieses Benutzers finden
Thema geschlossen  Thema schreiben 

Möglicherweise verwandte Themen...
Thema: Verfasser Antworten: Ansichten: Letzter Beitrag
  Subdomain Fehler Hilfe Dalli 6 2.984 22.11.2017 21:24
Letzter Beitrag: VanityHosting

 Druckversion anzeigen
 Thema einem Freund senden
 Thema abonnieren
 Thema zu den Favoriten hinzufügen

Sponsor-Board.de

Community
Über uns
Partner
Powered by Mybb: Copyright 2002-2024 by MyBB Group - Deutsche-Übersetzung von Mybb.de
 
© 2007-2024 Sponsor-Board.de - Hosted by OVH

Willkommen auf SB!   Sie benötigen ein Sponsoring?   1. Anmelden   2. Sponsoring-Anfrage erstellen   3. Nachrichten von Sponsoren erhalten   Kostenlos!   Jetzt registrieren