Apache Config und ein include

Irgendwelche Probleme mit XAMPP für Windows? Dann ist hier genau der richtige Ort um nachzufragen.

Apache Config und ein include

Postby chenjung » 09. December 2012 22:23

Malzeit meine Freunde ^^

Ich hätte da eine frage. Wenn ich jetzt z.b. IP Adressen die ich blocken will, in meine apache.conf einfügen will, also via include, bekomme ich immer beim Starten von Apache eine Fehler meldung. Aber der include befehlt geht doch so:

Include conf/extra/httpd-ipbann.conf

Ich habe kurzerhand eine .conf Datei erstellt, welche alle neuen IPs die gesperrt werden sollen, geladen werden. Liegt der Fehler jetzt am include oder an meiner httpd-ipbann.conf?

Weil ich habe da bis jetzt nur die IPs eingehauen, vielleicht war das der Fehler?
.conf schaut so aus:

# China IP Address Blocks
deny from 61.164.203.226/121.37.43.102
deny from 112.65.229.156
#---------------------------------------

Müsste ich dann den inlcude zwischen diesen hier machen?

<Directory "C:/web/htdocs">
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI

MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs/2.2/mod/core.html#options
# for more information.
#
Options Indexes FollowSymLinks

#
# AllowOverride controls what directives may be placed in .htaccess

files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride None

# ====================================== ZUGRIFF auf Server ausschließen =============================================
# Controls who can get stuff from this server.
#
Order allow,deny
Allow from all
Include conf/extra/httpd-ipbann.conf
</Directory>

Könnt ihr mir helfen?

Danke
chenjung
 
Posts: 8
Joined: 10. February 2006 15:32

Re: Apache Config und ein include

Postby Nobbie » 10. December 2012 10:50

chenjung wrote:Include conf/extra/httpd-ipbann.conf

Ich habe kurzerhand eine .conf Datei erstellt, welche alle neuen IPs die gesperrt werden sollen, geladen werden. Liegt der Fehler jetzt am include oder an meiner httpd-ipbann.conf?


Das steht im Error_Log von Apache genau drin, was ihn stört. "Eine Fehlermeldung" hat den Sinn, den Fehler zu beschreiben.

Wenn Du wirklich nur IPs reingeschrieben hast, dürfte das mindestens auch falsch sein, auch in include Dateien muss natürlich die Apache Syntax eingehalten werden, so als wenn Du es direkt in die httpd.conf schreibst.
Nobbie
 
Posts: 13170
Joined: 09. March 2008 13:04

Re: Apache Config und ein include

Postby chenjung » 10. December 2012 11:27

siehe unten
Last edited by chenjung on 10. December 2012 19:56, edited 1 time in total.
chenjung
 
Posts: 8
Joined: 10. February 2006 15:32

Re: Apache Config und ein include

Postby chenjung » 10. December 2012 19:55

Hier ist der Fehler:
[Mon Dec 10 19:43:10 2012] [notice] Parent: Received restart signal -- Restarting the server.
[Mon Dec 10 19:43:10 2012] [notice] Child 19868: Exit event signaled. Child process is ending.
Syntax error on line 1 of C:/web/conf/extra/httpd-ipbann.conf:
<Directory not allowed here

Scheint echt an der Syntax zu liegen!
chenjung
 
Posts: 8
Joined: 10. February 2006 15:32


Return to XAMPP für Windows

Who is online

Users browsing this forum: CptEureka and 37 guests