Konfiguration des Apache-Servers
Installation
apt-get install apache2 php5 php5-gd php5-mysql php5-dev php5-cli php5-imap php5-mcrypt
apache2.conf
NameVirtualHost 85.119.152.89:80
NameVirtualHost 85.119.152.89:443
ports.conf
conf.d/charset
Module
ln -s /etc/apache2/mods-available/rewrite.load /etc/apache2/mods-enabled/rewrite.load
ln -s /etc/apache2/mods-available/ssl.conf /etc/apache2/mods-enabled/ssl.conf
ln -s /etc/apache2/mods-available/ssl.load /etc/apache2/mods-enabled/ssl.load
Default-Seite anlegen
<VirtualHost 85.119.152.89:80>
ServerName *.stefan-macke.de
ServerAlias *.stefan-macke.com *.stefanmacke.de *.stefanmacke.com
ServerAdmin webmaster@stefan-macke.de
DocumentRoot /srv/www/default
<Directory /srv/www/default/>
Options None
AllowOverride None
Order allow,deny
allow from all
</Directory>
ErrorLog /var/log/apache2/error.default.log
LogLevel warn
CustomLog /var/log/apache2/access.default.log combined
</VirtualHost>
PHP
apt-get install php-pear
Die Dateien werden unter /usr/share/php abgelegt, hierauf muss auch der include_path in der /etc/php5/apache2/php.ini gesetzt werden
Die Berechtigungen für das PEAR-Verzeichnis müssen so gesetzt sein, dass der Webserver die Dateien lesen (bzw. ja meist inkludieren) kann
allow_call_time_pass_reference = On
safe_mode = On
safe_mode_gid = Off
safe_mode_include_dir = /usr/share/php
expose_php = Off
max_execution_time = 120
max_input_time = 60
memory_limit = 32M
display_errors = Off
log_errors = On
error_log = /var/log/apache2/php_error.log
include_path = ".:/usr/share/php"
allow_url_fopen = Off
sendmail_path = /usr/sbin/sendmail
eAccelerator
-
apt-get install make php5-dev autoconf automake1.4 libtool m4
phpize
./configure
make
make install
php.ini extension="eaccelerator.so"
eaccelerator.shm_size="16"
eaccelerator.cache_dir="/tmp/eaccelerator"
eaccelerator.enable="1"
eaccelerator.optimizer="1"
eaccelerator.check_mtime="1"
eaccelerator.debug="0"
eaccelerator.filter=""
eaccelerator.shm_max="0"
eaccelerator.shm_ttl="0"
eaccelerator.shm_prune_period="0"
eaccelerator.shm_only="0"
eaccelerator.compress="1"
eaccelerator.compress_level="9"
mkdir /tmp/eaccelerator
chmod 0777 /tmp/eaccelerator