Apache 2 und PHP 5 Installation sehr langsam

auto01

Aktives Mitglied
Thread Starter
Dabei seit
20.10.2004
Beiträge
125
Reaktionspunkte
3
Hallo Leute!

Ich habe auf einem MacOSX Server Apache/2.2.4 (Unix) PHP/5.2.1 installiert. Ich habe Apache und PHP kompiliert, da ich kein fertiges Binary gefunden habe, wo "bcmath" aktiviert ist.
Die Installation hat auch funktioniert. Ich habe jetzt nur das Problem, dass der Apache auf Anfragen sehr verzögert antwortet.
Es vergehen immer so 1-2 Sekunden, bis die angeforderte Seite zurück kommt. Ich kann das sehen anhand der Access_log Datei. Ich sehe in der Logadatei die Anfrage und dann vergehen so 1-2 Sekunden, bis die Datei zurück kommt. Ich habe das unter anderem mit einer "htm" Datei probiert, wo nur "Hallo Welt" drin steht. Es ist egeal ob ich php oder html Dateien aufrufe. Wenn ich den original Webserver anschalte, funktioniert alles sehr schnell.

Hat jemand eine Ahnung, woran das liegen kann?

Hier mal der virtuelle Host aus der httpd.conf. Den habe ich aus der httpd.conf des original Apache übernommen. IP's und Domains sind geändert.


<VirtualHost 000.000.000.000:16080>
ServerName domain.domain.com
ServerAdmin name@domain.de
DocumentRoot "/srv/www/htdocs"
DirectoryIndex "index.html" "index.php"
AddType application/x-httpd-php .html
AddType application/x-httpd-php .php
AddType application/x-httpd-php .php5
CustomLog "/var/log/httpd/access_log" "%{PC-Remote-Addr}i %l %u %t \"%r\" %>s %b"
ErrorLog "/var/log/httpd/error_log"
ErrorDocument 404 /error.html
<IfModule mod_ssl.c>
SSLEngine Off
SSLLog "/var/log/httpd/ssl_engine_log"
SSLCertificateFile "/etc/certificates/Default.crt"
SSLCertificateKeyFile "/etc/certificates/Default.key"
SSLCipherSuite "ALL:!ADH:RC4+RSA:+HIGH:+MEDIUM:+LOW:!SSLv2:+EXP:+eNULL"
</IfModule>
<IfModule mod_dav.c>
DAVLockDB "/var/run/davlocks/.davlock100"
DAVMinTimeout 600
</IfModule>
<Directory "/srv/www/htdocs">
Options All -Indexes -ExecCGI -Includes +MultiViews
<IfModule mod_dav.c>
DAV Off
</IfModule>
AllowOverride None
</Directory>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_METHOD} ^TRACE
RewriteRule .* - [F]
</IfModule>
<IfModule mod_alias.c>
</IfModule>
LogLevel warn
</VirtualHost>
 
haette da dns im verdacht, insbesondere eine moeglichkeit HostnameLookups: macht bei jedem zugriff einen dns-lookup.
OK, ich habe im Virtuellen Host noch ein
"HostnameLookups Off" eingebaut. Dadurch wird es auch nicht schneller

was soll das mit PC-Remote-Addr? ist doch kein standard http-header? schau dir mal die beschreibung unter http://httpd.apache.org/docs/2.2/mod/mod_log_config.html an.

Wenn ich das raus nehmen wirds auch nicht schneller.
Hier noch die Compile-Settings vom Apache. Vielleicht kann jemand daraus etwas erkennen:
:/usr/bin root# ./apachectl -V
Server version: Apache/2.2.4 (Unix)
Server built: Mar 13 2007 13:16:20
Server's Module Magic Number: 20051115:4
Server loaded: APR 1.2.8, APR-Util 1.2.8
Compiled using: APR 1.2.8, APR-Util 1.2.8
Architecture: 32-bit
Server MPM: Prefork
threaded: no
forked: yes (variable process count)
Server compiled with....
-D APACHE_MPM_DIR="server/mpm/prefork"
-D APR_HAS_MMAP
-D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
-D APR_USE_SYSVSEM_SERIALIZE
-D APR_USE_PTHREAD_SERIALIZE
-D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
-D APR_HAS_OTHER_CHILD
-D AP_HAVE_RELIABLE_PIPED_LOGS
-D DYNAMIC_MODULE_LIMIT=128
-D HTTPD_ROOT="/usr/local/apache2"
-D SUEXEC_BIN="/usr/local/apache2/bin/suexec"
-D DEFAULT_PIDLOG="/var/logs/httpd.pid"
-D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
-D DEFAULT_LOCKFILE="/var/logs/accept.lock"
-D DEFAULT_ERRORLOG="logs/error_log"
-D AP_TYPES_CONFIG_FILE="conf/mime.types"
-D SERVER_CONFIG_FILE="conf/httpd.conf"

Dann noch die geladenen Module

Geladene Module

/usr/bin root# ./apachectl -t -D DUMP_MODULES
Loaded Modules:
core_module (static)
authn_file_module (static)
authn_default_module (static)
authz_host_module (static)
authz_groupfile_module (static)
authz_user_module (static)
authz_default_module (static)
auth_basic_module (static)
include_module (static)
filter_module (static)
log_config_module (static)
env_module (static)
setenvif_module (static)
mpm_prefork_module (static)
http_module (static)
mime_module (static)
status_module (static)
autoindex_module (static)
asis_module (static)
cgi_module (static)
negotiation_module (static)
dir_module (static)
actions_module (static)
userdir_module (static)
alias_module (static)
rewrite_module (static)
so_module (static)
php5_module (shared)
Syntax OK

Passt hier irgend etwas nicht zusammen?
 
Zurück
Oben Unten