wiki/HowtoApache.md

57 lines
1.1 KiB
Markdown
Raw Normal View History

2016-10-04 10:08:10 +02:00
# Howto Apache
2016-10-04 15:07:06 +02:00
<https://httpd.apache.org/docs/2.4/>
2016-10-04 10:08:10 +02:00
## Installation
Nous utilisons [Apache-ITK](http://mpm-itk.sesse.net/) depuis des années en production sur de nombreux serveurs critiques.
2016-10-04 15:07:06 +02:00
Apache-ITK permet de préciser pour chaque VirtualHost un utilisateur/groupe/MaxClients spécifique, ce qui est utile pour la sécurité.
2016-10-04 10:08:10 +02:00
~~~
2016-10-04 15:07:06 +02:00
# aptitude install apache2-mpm-itk libapache2-mod-evasive apachetop libwww-perl
2016-10-04 10:08:10 +02:00
~~~
2016-10-04 15:07:06 +02:00
## Configuration de base
2016-10-05 00:41:38 +02:00
Fichiers de configuration :
2016-10-04 15:07:06 +02:00
2016-10-05 00:41:38 +02:00
/etc/apache2/
|-- apache2.conf
| `-- ports.conf
|-- mods-enabled
| |-- *.load
| `-- *.conf
|-- conf-enabled
| `-- *.conf
`-- sites-enabled
`-- *.conf
Activation des modules suivants :
2016-10-04 15:07:06 +02:00
~~~
# a2enmod rewrite expires headers rewrite cgi
~~~
2016-10-05 00:41:38 +02:00
Fichier `/etc/apache2/conf-available/z_evolix.conf` :
2016-10-04 15:07:06 +02:00
~~~{.apache}
ServerTokens Prod
2016-10-05 00:41:38 +02:00
Timeout 10
2016-10-04 15:07:06 +02:00
KeepAliveTimeout 2
MaxKeepAliveRequests 10
2016-10-05 00:41:38 +02:00
MaxClients 250
ServerLimit 250
StartServers 50
MinSpareServers 20
MaxSpareServers 30
MaxRequestsPerChild 0
2016-10-04 15:07:06 +02:00
~~~
~~~
2016-10-05 00:41:38 +02:00
# a2enconf z_evolix.conf
2016-10-04 15:07:06 +02:00
~~~
## SSL
## Awstats