Files
tp/apache.md

75 lines
1.6 KiB
Markdown
Raw Permalink Normal View History

2025-11-20 11:59:00 +01:00
# Apache
Installer le [paquet logiciel](package.md) apache
```shell
apt install --no-install-recommends apache2
```
> Fondamentalement, le serveur Apache n'exige pas seulement des autorisations de lecture de tous les fichiers qu'il dessert, mais l'autorisation d'exécution de tous les répertoires dans le chemin de votre hôte virtuel.
2025-11-21 11:47:37 +01:00
```shell
a2dismod autoindex
a2enmod rewrite
```
2025-11-20 11:59:00 +01:00
2025-11-21 11:47:37 +01:00
## PHP 8.4
2025-11-20 11:59:00 +01:00
```shell
apt install --no-install-recommends php-fpm
a2enconf php8.4-fpm
a2enmod proxy_fcgi
```
2025-11-21 11:47:37 +01:00
### Modules optionnels
2025-11-20 11:59:00 +01:00
2025-11-21 11:47:37 +01:00
#### Mbstring
2025-11-20 11:59:00 +01:00
```shell
apt install --no-install-recommends php-bcmath
```
2025-11-21 11:47:37 +01:00
```shell
2025-11-20 11:59:00 +01:00
apt install --no-install-recommends memcached libmemcached-tools
apt install --no-install-recommends php-memcached
apt install --no-install-recommends php-imagick
2025-11-21 11:47:37 +01:00
```
2025-11-20 11:59:00 +01:00
2025-11-27 09:45:43 +01:00
```shell
phpenmod imagick
```
```shell
apt list --installed | grep php
```
2025-11-20 11:59:00 +01:00
### Caddy
gpg: no valid OpenPGP data found
apt install ca-certificates
apt install --no-install-recommends debian-keyring apt-transport-https ca-certificates
apt install --no-install-recommends curl
apt install --no-install-recommends gpg
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | tee /etc/apt/sources.list.d/caddy-stable.list
chmod o+r /usr/share/keyrings/caddy-stable-archive-keyring.gpg
chmod o+r /etc/apt/sources.list.d/caddy-stable.list
apt update
apt install caddy
a2enmod remoteip
### SMTP
2025-12-02 08:17:55 +01:00
```shell
2025-11-20 11:59:00 +01:00
apt install --no-install-recommends msmtp-mta
2025-12-02 08:17:55 +01:00
systemctl enable --now msmtpd
```
```shell
apachectl configtest
```