Apache Webserver auf USB an 7170 will nicht starten

x-herbert

Neuer User
Mitglied seit
27 Jun 2006
Beiträge
158
Punkte für Reaktionen
0
Punkte
0
Hi,

ich habe nach

http://www.fritzmod.net/de/modification/apache/installation/

das Paket apache2_v2.4.6_php_v5.5.14.mipsel.tar auf einem USB-Stick unter /Apache gespeichert und wie beschrieben die config geändert (ja, Ordner Apache mit großem A)

auf der Konsole per putty

PHP:
/var/media/ftp/Memorex-CoolDriveB-01/Apache/bin/apache -f /var/media/ftp/Memorex-CoolDriveB-01/Apache/conf/apache.conf

gestartet aber per ps keinen Prozes gefunden

im error.log

PHP:
[Sat Jan 01 01:17:17 2000] [notice] Digest: generating secret for digest authentication ...
[Sat Jan 01 01:17:17 2000] [notice] Digest: done
[Sat Jan 01 01:17:17 2000] [notice] Apache/2.2.17 (Unix) DAV/2 configured -- resuming normal operations
[Sat Jan 01 01:17:34 2000] [error] [client 192.168.178.44] Directory index forbidden by Options directive: /var/tmp/apache/htdocs/
[Sat Jan 01 01:17:34 2000] [error] [client 192.168.178.44] File does not exist: /var/tmp/apache/htdocs/favicon.ico
[Sat Jan 01 01:17:37 2000] [error] [client 192.168.178.44] File does not exist: /var/tmp/apache/htdocs/favicon.ico
[Sat Jan 01 01:28:43 2000] [notice] caught SIGTERM, shutting down
[Sat Jan 01 01:31:02 2000] [notice] Digest: generating secret for digest authentication ...
[Sat Jan 01 01:31:02 2000] [notice] Digest: done
[Sat Jan 01 01:31:02 2000] [notice] Apache/2.2.17 (Unix) DAV/2 configured -- resuming normal operations
[Tue Mar 24 20:13:02.105399 2015] [auth_digest:notice] [pid 2106:tid 1024] AH01757: generating secret for digest authentication ...
[Tue Mar 24 20:13:02.121677 2015] [auth_digest:error] [pid 2106:tid 1024] (2)No such file or directory: AH01762: Failed to create shared memory segment on file /var/apache2/logs/authdigest_shm.2106
[Tue Mar 24 20:13:02.122122 2015] [auth_digest:error] [pid 2106:tid 1024] (2)No such file or directory: AH01760: failed to initialize shm - all nonce-count checking, one-time nonces, and MD5-sess algorithm disabled
[Tue Mar 24 20:13:02.122377 2015] [:emerg] [pid 2106:tid 1024] AH00020: Configuration Failed, exiting
[Tue Mar 24 20:15:21.118859 2015] [auth_digest:notice] [pid 2108:tid 1024] AH01757: generating secret for digest authentication ...
[Tue Mar 24 20:15:21.120636 2015] [auth_digest:error] [pid 2108:tid 1024] (2)No such file or directory: AH01762: Failed to create shared memory segment on file /var/apache2/logs/authdigest_shm.2108
[Tue Mar 24 20:15:21.121070 2015] [auth_digest:error] [pid 2108:tid 1024] (2)No such file or directory: AH01760: failed to initialize shm - all nonce-count checking, one-time nonces, and MD5-sess algorithm disabled
[Tue Mar 24 20:15:21.121359 2015] [:emerg] [pid 2108:tid 1024] AH00020: Configuration Failed, exiting
[Tue Mar 24 20:30:17.102113 2015] [auth_digest:notice] [pid 2119:tid 1024] AH01757: generating secret for digest authentication ...
[Tue Mar 24 20:30:17.104793 2015] [auth_digest:error] [pid 2119:tid 1024] (2)No such file or directory: AH01762: Failed to create shared memory segment on file /var/apache2/logs/authdigest_shm.2119
[Tue Mar 24 20:30:17.105250 2015] [auth_digest:error] [pid 2119:tid 1024] (2)No such file or directory: AH01760: failed to initialize shm - all nonce-count checking, one-time nonces, and MD5-sess algorithm disabled
[Tue Mar 24 20:30:17.105528 2015] [:emerg] [pid 2119:tid 1024] AH00020: Configuration Failed, exiting
[Tue Mar 24 20:31:00.094817 2015] [auth_digest:notice] [pid 2123:tid 1024] AH01757: generating secret for digest authentication ...
[Tue Mar 24 20:31:00.096126 2015] [auth_digest:error] [pid 2123:tid 1024] (2)No such file or directory: AH01762: Failed to create shared memory segment on file /var/apache2/logs/authdigest_shm.2123
[Tue Mar 24 20:31:00.096577 2015] [auth_digest:error] [pid 2123:tid 1024] (2)No such file or directory: AH01760: failed to initialize shm - all nonce-count checking, one-time nonces, and MD5-sess algorithm disabled
[Tue Mar 24 20:31:00.096830 2015] [:emerg] [pid 2123:tid 1024] AH00020: Configuration Failed, exiting
[Tue Mar 24 20:34:49.111814 2015] [auth_digest:notice] [pid 2131:tid 1024] AH01757: generating secret for digest authentication ...
[Tue Mar 24 20:34:49.113138 2015] [auth_digest:error] [pid 2131:tid 1024] (2)No such file or directory: AH01762: Failed to create shared memory segment on file /var/apache2/logs/authdigest_shm.2131
[Tue Mar 24 20:34:49.115408 2015] [auth_digest:error] [pid 2131:tid 1024] (2)No such file or directory: AH01760: failed to initialize shm - all nonce-count checking, one-time nonces, and MD5-sess algorithm disabled
[Tue Mar 24 20:34:49.115672 2015] [:emerg] [pid 2131:tid 1024] AH00020: Configuration Failed, exiting

... hat jemand eine Idee?

Dank vorab
 
Verzeichnis "/var/apache2/logs" anlegen?
 
super - damit klappt es! Danke...

... nächstes Problem: wie in http://www.fritzmod.net/de/modification/apache/php/ beschrieben habe ich die Datei unter cgi-bin abgespeichert, nach "php" umbenannt und chmod gemacht

ein ./php -h liefert auch die übliche Ausgabe an mögl. Parametern

ABER

die php-Dateien werden nicht geparst sondern der Quelltext auf den Webseiten ausgegeben - lt. Beschreibung muss die conf nicht angepasst werden

Apache habe ich einem Restart verpasst - html wird angezeigt

hmmm??????
 
Erwartest Du jetzt, daß sich jemand zur Lösung Deines Problems in die Beschreibung und die Inhalte der Konfigurationsdateien auf www.fritzmod.net einliest? :gruebel:

Dir ist schon bewußt, daß die dort beschriebene Vorgehensweise mit diesem Forum praktisch nichts zu tun hat? Auch kann man aus Deinen bisher veröffentlichten Informationen einige wichtige Punkte gar nicht herauslesen, das fängt bei der eingesetzten Firmware-Version an.

Wie wäre es denn stattdessen, wenn Du mal selbst die möglichen "Schwachstellen" einer solchen Konfiguration (z.B. notwendige AddHandler-Statements für die httpd.conf) der Reihe nach überprüfst? Ansonsten darf man ja wenigstens die "Vorstellung" der verwendeten Konfiguration von Dir erwarten, oder?

Wenn Du nach "Kochrezept" einen Webserver aufsetzen willst, solltest Du trotzdem die Grundbegriffe dabei beherrschen ... ansonsten richtet so ein Server am Ende mehr Schaden an, als er potentiellen Nutzen bringt - anders als eine einzelne Mahlzeit beim Kochen kann einem so ein falsch konfigurierter Webserver das Leben auch über einen längeren Zeitraum vermiesen.

Versteh' das bitte nicht falsch, aber warum sollte sich jemand die Arbeit machen und die auf www.fritzmod.net bereitgestellten Informationen nach einem möglichen Problem (bzw. schon nach der dort vorgeschlagenen Vorgehensweise) durchsuchen? Du willst ja sicherlich auch nicht nur eine Antwort in Form eines Links haben, ansonsten wäre das hier eine mögliche Antwort.

Von den potentiellen Sicherheitsproblemen einer direkt aufrufbaren Datei "/cgi-bin/php" bei falsch konfiguriertem "ScriptAlias" will ich gar nicht erst reden (POST threat) ... ich habe keine Ahnung (und auch keine Lust, es festzustellen), wie sicher die auf www.fritzmod.net angebotene Apache2-Konfiguration an diesem Punkt tatsächlich ist. Schon deshalb sollte jeder potentielle Webmaster auch in der Lage sein, seine eigene Konfiguration zu verstehen und sich nicht auf andere blind verlassen müssen.
 
Erwartest Du jetzt, daß sich jemand zur Lösung Deines Problems in die Beschreibung und die Inhalte der Konfigurationsdateien auf www.fritzmod.net einliest? :gruebel:

nein - davon gehe ich nicht aus...

aber ggf. hat jemand jemand das gleiche Ziel und Vorgehen gehabt und bei selbigem Problem hängen geblieben ... und hat eine Lösung oder Tipp
 
und hat eine Lösung oder Tipp
Da wäre natürlich die verwendete Konfiguration extrem hilfreich bei der Einschätzung der Lage und die hätte auch gleich noch den Vorteil, daß damit auch jemand etwas anfangen kann, der über abstrakte bzw. allgemeinere Kenntnisse des Apache2-Servers verfügt und die Vorgehensweise von www.fritzmod.net nicht kennt/kennen will.

[OT - zumindest bei der konkreten Fragestellung]
In diesem Zusammenhang sei noch einmal ausdrücklich vor dem Kopieren eines Interpreters für beliebige Kommandos (egal, ob das Perl, PHP oder eine Bash-Shell ist) in das "cgi-bin"-Verzeichnis gewarnt. Zwar kann man auch solche Konstellationen sicher konfigurieren, aber wenn man die korrekte Interpretation von entsprechenden Skripten mit anderen Mitteln sicher stellt, geht man das Risiko, das sich aus einem falsch konfigurierten "cgi-bin"-Verzeichnis ergibt/ergeben kann, gar nicht erst ein und das unter www.fritzmod.net vorgeschlagene Kopieren des PHP-Interpreters an eine - bei ungenügender Konfiguration - von extern erreichbare Stelle ist eher "old fashioned" und würde - meine Meinung - heute nicht mehr so vorgeschlagen, wenn man die (idioten-)sichere Konfiguration eines Apache2-Servers zum Ziel hat.

Auch die gerne genommene Argumentation in diesem Zusammenhang, der Server "wäre ja nur für die interne Verwendung gedacht", sollte man sich mehrfach überlegen, da sich in der Praxis leider immer wieder zeigt, daß spätestens nach einiger Zeit, wenn so ein Server dann erst einmal Inhalte passend bereitstellen kann, diese Einschränkung bei weiteren Planungen aus den Augen gerät und so landen dann eben unsicher konfigurierte Server mit einer simplen Portweiterleitung im Internet und der Schaden läßt nicht lange auf sich warten.

Das klingt zunächst nach einer "abstrakten Gefahr", aber dieser Vorgang des "Vergessens" tritt häufig genug auch dann auf, wenn der ursprüngliche "Installateur" des Servers auch derjenige ist, der einige Zeit später genau diesen Server dann ins Internet hängt. Mit einer per se sicheren Konfiguration (sie kann ja auch bei reiner Verwendung eines solchen Servers aus dem LAN nicht schaden) geht man ein solches Risiko gar nicht erst ein ...
[/OT]
 
vorab meinen Dank für die Zeit!

die apache.conf:

PHP:
#
# This is the main Apache HTTP server configuration file.  It contains the
# configuration directives that give the server its instructions.
# See <URL:http://httpd.apache.org/docs/2.4/> for detailed information.
# In particular, see 
# <URL:http://httpd.apache.org/docs/2.4/mod/directives.html>
# for a discussion of each configuration directive.
#
# Do NOT simply read the instructions in here without understanding
# what they do.  They're here only as hints or reminders.  If you are unsure
# consult the online docs. You have been warned.  
#
# Configuration and logfile names: If the filenames you specify for many
# of the server's control files begin with "/" (or "drive:/" for Win32), the
# server will use that explicit path.  If the filenames do *not* begin
# with "/", the value of ServerRoot is prepended -- so "logs/access.log"
# with ServerRoot set to "/usr/local/apache2" will be interpreted by the
# server as "/usr/local/apache2/logs/access.log", whereas "/logs/access.log" 
# will be interpreted as '/logs/access.log'.

#
# ServerRoot: The top of the directory tree under which the server's
# configuration, error, and log files are kept.
#
# Do not add a slash at the end of the directory path.  If you point
# ServerRoot at a non-local disk, be sure to specify a local disk on the
# Mutex directive, if file-based mutexes are used.  If you wish to share the
# same ServerRoot for multiple httpd daemons, you will need to change at
# least PidFile.
#
ServerRoot "/var/media/ftp/USB-CoolDriveB-01/Apache"

#
# Mutex: Allows you to set the mutex mechanism and mutex file directory
# for individual mutexes, or change the global defaults
#
# Uncomment and change the directory if mutexes are file-based and the default
# mutex file directory is not on a local disk or is not appropriate for some
# other reason.
#
# Mutex default:/var/media/ftp/USB-CoolDriveB-01/Apache/logs

#
# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, instead of the default. See also the <VirtualHost>
# directive.
#
# Change this to Listen on specific IP addresses as shown below to 
# prevent Apache from glomming onto all bound IP addresses.
#
#Listen 12.34.56.78:80
Listen 85

#
# Dynamic Shared Object (DSO) Support
#
# To be able to use the functionality of a module which was built as a DSO you
# have to place corresponding `LoadModule' lines at this location so the
# directives contained in it are actually available _before_ they are used.
# Statically compiled modules (those listed by `httpd -l') do not need
# to be loaded here.
#
# Example:
# LoadModule foo_module modules/mod_foo.so
#

<IfModule unixd_module>
#
# If you wish httpd to run as a different user or group, you must run
# httpd as root initially and it will switch.  
#
# User/Group: The name (or #number) of the user/group to run httpd as.
# It is usually good practice to create a dedicated user and group for
# running httpd, as with most system services.
#
User boxusr80
Group root

</IfModule>

# 'Main' server configuration
#
# The directives in this section set up the values used by the 'main'
# server, which responds to any requests that aren't handled by a
# <VirtualHost> definition.  These values also provide defaults for
# any <VirtualHost> containers you may define later in the file.
#
# All of these directives may appear inside <VirtualHost> containers,
# in which case these default settings will be overridden for the
# virtual host being defined.
#

#
# ServerAdmin: Your address, where problems with the server should be
# e-mailed.  This address appears on some server-generated pages, such
# as error documents.  e.g. [email protected]
#
ServerAdmin [email protected]

#
# ServerName gives the name and port that the server uses to identify itself.
# This can often be determined automatically, but we recommend you specify
# it explicitly to prevent problems during startup.
#
# If your host doesn't have a registered DNS name, enter its IP address here.
#
#ServerName www.example.com:80

#
# Deny access to the entirety of your server's filesystem. You must
# explicitly permit access to web content directories in other 
# <Directory> blocks below.
#
<Directory />
    AllowOverride none
    Require all denied
</Directory>

#
# Note that from this point forward you must specifically allow
# particular features to be enabled - so if something's not working as
# you might expect, make sure that you have specifically enabled it
# below.
#

#
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "/var/media/ftp/USB-CoolDriveB-01/Apache/htdocs"
<Directory "/var/media/ftp/USB-CoolDriveB-01/Apache/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.4/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:
    #   AllowOverride FileInfo AuthConfig Limit
    #
    AllowOverride None

    #
    # Controls who can get stuff from this server.
    #
    Require all granted
</Directory>

#
# DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.
#
<IfModule dir_module>
    DirectoryIndex index.php index.html index.htm
</IfModule>

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

#
# ErrorLog: The location of the error log file.
# If you do not specify an ErrorLog directive within a <VirtualHost>
# container, error messages relating to that virtual host will be
# logged here.  If you *do* define an error logfile for a <VirtualHost>
# container, that host's errors will be logged there and not here.
#
ErrorLog "/var/media/ftp/USB-CoolDriveB-01/Apache/logs/error.log"

#
# LogLevel: Control the number of messages logged to the error.log.
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
#
LogLevel warn

<IfModule log_config_module>
    #
    # The following directives define some format nicknames for use with
    # a CustomLog directive (see below).
    #
    LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
    LogFormat "%h %l %u %t \"%r\" %>s %b" common

    <IfModule logio_module>
      # You need to enable mod_logio.c to use %I and %O
      LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
    </IfModule>

    #
    # The location and format of the access logfile (Common Logfile Format).
    # If you do not define any access logfiles within a <VirtualHost>
    # container, they will be logged here.  Contrariwise, if you *do*
    # define per-<VirtualHost> access logfiles, transactions will be
    # logged therein and *not* in this file.
    #
    CustomLog "/var/media/ftp/USB-CoolDriveB-01/Apache/logs/access.log" common

    #
    # If you prefer a logfile with access, agent, and referer information
    # (Combined Logfile Format) you can use the following directive.
    #
    #CustomLog "/var/media/ftp/USB-CoolDriveB-01/Apache/logs/access.log" combined
</IfModule>


<IfModule alias_module>
    #
    # Redirect: Allows you to tell clients about documents that used to 
    # exist in your server's namespace, but do not anymore. The client 
    # will make a new request for the document at its new location.
    # Example:
    # Redirect permanent /foo http://www.example.com/bar

    #
    # Alias: Maps web paths into filesystem paths and is used to
    # access content that does not live under the DocumentRoot.
    # Example:
    # Alias /webpath /full/filesystem/path
    #
    # If you include a trailing / on /webpath then the server will
    # require it to be present in the URL.  You will also likely
    # need to provide a <Directory> section to allow access to
    # the filesystem path.

    #
    # ScriptAlias: This controls which directories contain server scripts. 
    # ScriptAliases are essentially the same as Aliases, except that
    # documents in the target directory are treated as applications and
    # run by the server when requested rather than as documents sent to the
    # client.  The same rules about trailing "/" apply to ScriptAlias
    # directives as to Alias.
    #
    ScriptAlias /cgi-bin/ "/var/media/ftp/USB-CoolDriveB-01/Apache/cgi-bin/"
    
</IfModule>


<IfModule cgid_module>
    #
    # ScriptSock: On threaded servers, designate the path to the UNIX
    # socket used to communicate with the CGI daemon of mod_cgid.
    #
    #Scriptsock cgisock
</IfModule>

#
# "/var/media/ftp/USB-CoolDriveB-01/Apache/cgi-bin" should be changed to whatever your ScriptAliased
# CGI directory exists, if you have that configured.
#
<Directory "/var/media/ftp/USB-CoolDriveB-01/Apache/cgi-bin">
    AllowOverride None
    Options None
    Require all granted
</Directory>

<IfModule mime_module>
    #
    # TypesConfig points to the file containing the list of mappings from
    # filename extension to MIME-type.
    #
    TypesConfig /var/media/ftp/USB-CoolDriveB-01/Apache/conf/mime.types

    #
    # AddType allows you to add to or override the MIME configuration
    # file specified in TypesConfig for specific file types.
    #
    #AddType application/x-gzip .tgz
    #
    # AddEncoding allows you to have certain browsers uncompress
    # information on the fly. Note: Not all browsers support this.
    #
    #AddEncoding x-compress .Z
    #AddEncoding x-gzip .gz .tgz
    #
    # If the AddEncoding directives above are commented-out, then you
    # probably should define those extensions to indicate media types:
    #
    AddType application/x-compress .Z
    AddType application/x-gzip .gz .tgz

    #
    # AddHandler allows you to map certain file extensions to "handlers":
    # actions unrelated to filetype. These can be either built into the server
    # or added with the Action directive (see below)
    #
    # To use CGI scripts outside of ScriptAliased directories:
    # (You will also need to add "ExecCGI" to the "Options" directive.)
    #
    #AddHandler cgi-script .cgi

    # For type maps (negotiated resources):
    #AddHandler type-map var

    #
    # Filters allow you to process content before it is sent to the client.
    #
    # To parse .shtml files for server-side includes (SSI):
    # (You will also need to add "Includes" to the "Options" directive.)
    #
    #AddType text/html .shtml
    #AddOutputFilter INCLUDES .shtml
</IfModule>

#
# The mod_mime_magic module allows the server to use various hints from the
# contents of the file itself to determine its type.  The MIMEMagicFile
# directive tells the module where the hint definitions are located.
#
#MIMEMagicFile /var/media/ftp/USB-CoolDriveB-01/Apache/conf/magic

#
# Customizable error responses come in three flavors:
# 1) plain text 2) local redirects 3) external redirects
#
# Some examples:
#ErrorDocument 500 "The server made a boo boo."
#ErrorDocument 404 /missing.html
#ErrorDocument 404 "/cgi-bin/missing_handler.pl"
#ErrorDocument 402 http://www.example.com/subscription_info.html
#

#
# MaxRanges: Maximum number of Ranges in a request before
# returning the entire resource, or one of the special
# values 'default', 'none' or 'unlimited'.
# Default setting is to accept 200 Ranges.
#MaxRanges unlimited

#
# EnableMMAP and EnableSendfile: On systems that support it, 
# memory-mapping or the sendfile syscall may be used to deliver
# files.  This usually improves server performance, but must
# be turned off when serving from networked-mounted 
# filesystems or if support for these functions is otherwise
# broken on your system.
# Defaults: EnableMMAP On, EnableSendfile Off
#
#EnableMMAP off
#EnableSendfile on

# Supplemental configuration
#
# The configuration files in the /var/media/ftp/USB-CoolDriveB-01/Apache/conf/extra/ directory can be 
# included to add extra features or to modify the default configuration of 
# the server, or you may simply copy their contents here and change as 
# necessary.

# Server-pool management (MPM specific)
#Include /var/media/ftp/USB-CoolDriveB-01/Apache/conf/extra/httpd-mpm.conf

# Multi-language error messages
#Include /var/media/ftp/USB-CoolDriveB-01/Apache/conf/extra/httpd-multilang-errordoc.conf

# Fancy directory listings
#Include /var/media/ftp/USB-CoolDriveB-01/Apache/conf/extra/httpd-autoindex.conf

# Language settings
#Include /var/media/ftp/USB-CoolDriveB-01/Apache/conf/extra/httpd-languages.conf

# User home directories
#Include /var/media/ftp/USB-CoolDriveB-01/Apache/conf/extra/httpd-userdir.conf

# Real-time info on requests and configuration
#Include /var/media/ftp/USB-CoolDriveB-01/Apache/conf/extra/httpd-info.conf

# Virtual hosts
#Include /var/media/ftp/USB-CoolDriveB-01/Apache/conf/extra/httpd-vhosts.conf

# Local access to the Apache HTTP Server Manual
#Include /var/media/ftp/USB-CoolDriveB-01/Apache/conf/extra/httpd-manual.conf

# Distributed authoring and versioning (WebDAV)
#Include /var/media/ftp/USB-CoolDriveB-01/Apache/conf/extra/httpd-dav.conf

# Various default settings
#Include /var/media/ftp/USB-CoolDriveB-01/Apache/conf/extra/httpd-default.conf

# Configure mod_proxy_html to understand HTML4/XHTML1
<IfModule proxy_html_module>
Include /var/media/ftp/USB-CoolDriveB-01/Apache/conf/extra/proxy-html.conf
</IfModule>

# Secure (SSL/TLS) connections
#Include /var/media/ftp/USB-CoolDriveB-01/Apache/conf/extra/httpd-ssl.conf
#
# Note: The following must must be present to support
#       starting without SSL on platforms with no /dev/random equivalent
#       but a statically compiled-in mod_ssl.
#
<IfModule ssl_module>
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
</IfModule>
#
# uncomment out the below to deal with user agents that deliberately
# violate open standards by misusing DNT (DNT *must* be a specific
# end-user choice)
#
#<IfModule setenvif_module>
#BrowserMatch "MSIE 10.0;" bad_DNT
#</IfModule>
#<IfModule headers_module>
#RequestHeader unset DNT env=bad_DNT
#</IfModule>

access.log

PHP:
192.168.1.165 - - [25/Mar/2015:08:44:00 +0100] "GET /phpinfo.php HTTP/1.1" 200 36

error.log
PHP:
[Wed Mar 25 08:34:34.057260 2015] [mpm_worker:notice] [pid 854:tid 1024] AH00292: Apache/2.4.9 (Unix) OpenSSL/0.9.8za configured -- resuming normal operations
[Wed Mar 25 08:34:34.058050 2015] [core:notice] [pid 854:tid 1024] AH00094: Command line: './apache -f /var/media/ftp/USB-CoolDriveB-01/Apache/conf/apache.conf'
 
1. Ich sehe da kein Statement für die Definition von "php" als "handler" für "*.php"-Files ... damit ist es - m.E. - normal, wenn php-Files als Text ausgeliefert werden, weil "php" als Interpreter gar nicht aufgerufen wird.

2. Die von Deinem Apache2 verwendete OpenSSL-Bibliothek (ich nehme mal an, die ist statisch gelinkt) ist stark veraltet (0.9.8za vom Juni 2014) ... ich würde damit keinen SSL-Server mehr betreiben und dann kann man den SSL-Teil auch gleich ganz weglassen, das spart - besonders auf einer 7170 - auch Resourcen, die an anderer Stelle dringender benötigt werden.
 
SSL brauche ich nicht - ich will nur meine Calibre Biliothek ins LAN stellen...


so in dem dreh?
PHP:
...
<IfModule alias_module>
    #
    # Redirect: Allows you to tell clients about documents that used to 
    # exist in your server's namespace, but do not anymore. The client 
    # will make a new request for the document at its new location.
    # Example:
    # Redirect permanent /foo http://www.example.com/bar

    #
    # Alias: Maps web paths into filesystem paths and is used to
    # access content that does not live under the DocumentRoot.
    # Example:
    # Alias /webpath /full/filesystem/path
    #
    # If you include a trailing / on /webpath then the server will
    # require it to be present in the URL.  You will also likely
    # need to provide a <Directory> section to allow access to
    # the filesystem path.

    #
    # ScriptAlias: This controls which directories contain server scripts. 
    # ScriptAliases are essentially the same as Aliases, except that
    # documents in the target directory are treated as applications and
    # run by the server when requested rather than as documents sent to the
    # client.  The same rules about trailing "/" apply to ScriptAlias
    # directives as to Alias.
    #
    ScriptAlias /cgi-bin/ "/var/media/ftp/USB-CoolDriveB-01/Apache/cgi-bin/"
    
    AddHandler application/x-httpd-php5 php
    Action application/x-httpd-php5 /cgi-bin/php

</IfModule>
...
 
x-herbert schrieb:
SSL brauche ich nicht
Dann würde ich mir gleich einen Apache2 ohne SSL-Unterstützung zulegen ... das spart - wie bereits geschrieben - Ressourcen auf der ohnehin recht schwachbrüstigen 7170.

Die Richtug stimmt, aber warum das in einem "IfModule"-Abschnitt stehen soll, leuchtet mir nicht ein ...

Vielleicht liest Du Dir ja mal diese Dokumentation durch, insbesondere den Abschnitt "But it's still not working!" und folgst den dort aufgelisteten Ratschlägen. Es macht nicht so sehr viel Sinn, die - m.E. recht gute - Apache2-Dokumentation hier noch einmal aufzudröseln. Deine php-Files liegen ja ganz offensichtlich (jedenfalls nach der access.log zu urteilen, die im Wurzelverzeichnis des Server einen Aufruf von phpinfo.php ausweist) nicht innerhalb eines "ScriptAlias"-Verzeichnisses und damit mußt Du dem Apache2-Server den richtigen Interpreter auf anderem Weg zuweisen.

Ich würde auch dann noch den PHP-Interpreter nicht in die Verzeichnisstruktur des Servers mit aufnehmen (es gibt keinen rationalen Grund - einige Spezialitäten und eine bewußt offene Verwendung von PHP mal ausgeklammert, warum der PHP-Interpreter in /cgi-bin/ unterhalb des Apache-DocumentRoot liegen sollte/muß) und mich dabei dann auf die passende Konfiguration eines "ScriptAlias" mit entsprechenden Einschränkungen verlassen ... das wäre mir persönlich zu heikel, weil schon eine abweichende .htaccess-Datei dann den Schaden anrichten kann. Aber das ist nur meine Meinung und die typische Paranoia ...

Wenn Du Deine PHP-Files tatsächlich über CGI ausführen willst, brauchst Du für das betreffende Verzeichnis auch noch die passende "ExecCGI"-Option und - i.d.R. - den passenden "shebang"-Eintrag im PHP-File. Das alles kannst Du auch einfacher haben, wenn Du einen Apache2 mit "mod_php[45].so" verwendest. Welche Variante die performantere auf einer 7170 ist, wage ich aber nicht einzuschätzen.
 

Neueste Beiträge

Statistik des Forums

Themen
244,872
Beiträge
2,219,915
Mitglieder
371,594
Neuestes Mitglied
AA-Idealbau
Holen Sie sich 3CX - völlig kostenlos!
Verbinden Sie Ihr Team und Ihre Kunden Telefonie Livechat Videokonferenzen

Gehostet oder selbst-verwaltet. Für bis zu 10 Nutzer dauerhaft kostenlos. Keine Kreditkartendetails erforderlich. Ohne Risiko testen.

3CX
Für diese E-Mail-Adresse besteht bereits ein 3CX-Konto. Sie werden zum Kundenportal weitergeleitet, wo Sie sich anmelden oder Ihr Passwort zurücksetzen können, falls Sie dieses vergessen haben.