{{tag>en en:linux en:server en:web}} ====== Web Server (Apache) ====== This page describes the installation of Apache and PHP which is often required for various services. ===== Installation ===== With Debian install the following packages : * apache2 * PHP5 Apache will be installed in prefork mode because the threaded mode is not supported by php. ===== Configuration principle ===== The apache configuration is defined into the file ///etc/apache2/apache2.conf//. This file includes other files dynamically : * /etc/apache2/apache2.conf * /etc/apache2/httpd.conf * /etc/apache2/conf.d/ * /etc/apache2/sites-enables * /etc/apache2/mods-enables The standard configuration is done by creating one or more files located in ///etc/apache2/sites-available/// and enabling them. To enable of disable a file, use the following commands : * a2ensite * a2dissite For modules, the commands are : * a2enmod * a2dismod For exemple, to disable the default configuration : bender:/etc/apache2/sites-available# a2dissite default Site default disabled; run /etc/init.d/apache2 reload to fully disable. bender:/etc/apache2/sites-available# ===== Advanced configuration ===== To see details of apache configuration, please check the following pages : * [[en:linux:serveur_web:config]] * [[en:linux:serveur_web:ssl]] * [[en:linux:serveur_web:auth]] ===== Backup ===== * /etc/apache2/ * /var/log/apache2/ * /etc/logrotate.d/apache2 * /etc/php5/apache2/php.ini * /var/www/ ===== Links ===== * http://www.apache.org * http://httpd.apache.org/docs/2.2/ * http://httpd.apache.org/docs/2.2/mod/mod_dbd.html * http://httpd.apache.org/docs/2.2/mod/mod_authn_dbd.html * http://apache.webthing.com/database/