PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : Problem mit neuem Apache und cgi



schoedinger
29.09.14, 10:45
Hi,

nach einem Crash meines alten Servers versuche ich gerade alles auf einen neuen Server zu porteiren. Jetzt habe ich aber ein kleines Problem mit dem Apache.

Ich erhalte immer diese Fehlermeldung:



[Mon Sep 29 08:31:57.814559 2014] [cgi:error] [pid 30683] [client MEINEIP:41490] Options ExecCGI is off in this directory: /var/www/kivitendo-erp/controller.pl, referer: http://MEIN-SERVER.de/



hier meine sites-enabled/000-default.conf


<VirtualHost *:80>
ServerAdmin webmaster@localhost

DocumentRoot /var/www/kivitendo-erp
# DocumentRoot /var/www
<Directory />
Options FollowSymLinks
#AllowOverride None
AllowOverride All
</Directory>
# <Directory /var/www/>
<Directory /var/www/kivitendo-erp/>
Options Indexes FollowSymLinks MultiViews
#AllowOverride None
AllowOverride All
Order allow,deny
allow from all
#AddHandler cgi-script .pl
</Directory>

#ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
#<Directory "/usr/lib/cgi-bin">
#AllowOverride None
# AllowOverride All
# Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
# Order allow,deny
# Allow from all
# </Directory>

ErrorLog ${APACHE_LOG_DIR}/error.log

# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn

CustomLog ${APACHE_LOG_DIR}/access.log combined

Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>
Include conf-available/serve-cgi-bin.conf

</VirtualHost>


hier meine apache2.conf



# Include module configuration:
IncludeOptional mods-enabled/*.load
IncludeOptional mods-enabled/*.conf

# Include list of ports to listen on
Include ports.conf


# Sets the default security model of the Apache2 HTTPD server. It does
# not allow access to the root filesystem outside of /usr/share and /var/www.
# The former is used by web applications packaged in Debian,
# the latter may be used for local directories served by the web server. If
# your system is serving content from a sub-directory in /srv you must allow
# access here, or in any related virtual host.
<Directory />
Options FollowSymLinks
AllowOverride None
Require all denied
</Directory>

<Directory /usr/share>
AllowOverride None
Require all granted
</Directory>

<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>

#<Directory /srv/>
# Options Indexes FollowSymLinks
# AllowOverride None
# Require all granted
#</Directory>



#Alias /kivitendo-erp/ /var/www/kivitendo-erp/


<Directory "/var/www/kivitendo-erp">
Options ExecCGI Includes FollowSymlinks
AddHandler cgi-script .pl
</Directory>

<Directory /var/www/kivitendo-erp/users>
Order Deny,Allow
Deny from All
</Directory>









# AccessFileName: The name of the file to look for in each directory
# for additional configuration directives. See also the AllowOverride
# directive.
#
AccessFileName .htaccess

#
# The following lines prevent .htaccess and .htpasswd files from being
# viewed by Web clients.
#
<FilesMatch "^\.ht">
Require all denied
</FilesMatch>


#
# The following directives define some format nicknames for use with
# a CustomLog directive.
#
# These deviate from the Common Log Format definitions in that they use %O
# (the actual bytes sent including headers) instead of %b (the size of the
# requested file), because the latter makes it impossible to detect partial
# requests.
#
# Note that the use of %{X-Forwarded-For}i instead of %h is not recommended.
# Use mod_remoteip instead.
#
LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %O" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent



cgi habe ich auch mittels


a2enmod cgi

aktiviert und den Server auch neugestartet.

Danke euch schon mal für eure Hilfe.

marce
29.09.14, 10:59
ich vermute, daß Deine sites-enabled nach der apache2.conf geladen wird und damit die Options wieder zurückgesetzt werden.

Pack die Direktive also direkt in den VHost und es sollte passen.

Ansonsten empfehle ich die Lektüre der Apache-Doku, da wird derlei auch erwähnt.