tech:apache_reverseproxy_use_proxy
Différences
Ci-dessous, les différences entre deux révisions de la page.
| Prochaine révision | Révision précédente | ||
| tech:apache_reverseproxy_use_proxy [2025/03/24 15:06] – créée - modification externe 127.0.0.1 | tech:apache_reverseproxy_use_proxy [2026/07/16 12:10] (Version actuelle) – Jean-Baptiste | ||
|---|---|---|---|
| Ligne 1: | Ligne 1: | ||
| + | < | ||
| + | {{tag> | ||
| + | |||
| + | # Apache Proxy inverse sort par un proxy | ||
| + | |||
| + | ## Exemple de configuration Apache | ||
| + | |||
| + | | ||
| + | |||
| + | |||
| + | Activation des modules apaches | ||
| + | |||
| + | ~~~bash | ||
| + | a2enmod proxy proxy_http proxy_connect | ||
| + | ~~~ | ||
| + | |||
| + | `/ | ||
| + | ~~~apache | ||
| + | # Conf Proxy inverse | ||
| + | AllowCONNECT 443 | ||
| + | SSLProxyEngine on | ||
| + | ProxyPass /Truc/ https:// | ||
| + | ProxyPassReverse /Truc/ https:// | ||
| + | |||
| + | |||
| + | # Conf client proxy | ||
| + | # Si le serveur doit sortir par un proxy | ||
| + | ProxyRemote * http:// | ||
| + | ~~~ | ||
| + | |||
| + | On vérifie la conf | ||
| + | |||
| + | ~~~bash | ||
| + | apachectl -t | ||
| + | ~~~ | ||
| + | |||
| + | On recharge la conf Apache | ||
| + | |||
| + | ~~~bash | ||
| + | service apache2 reload | ||
| + | ~~~ | ||
| + | |||
| + | |||
| + | ## Exemple de conf/ | ||
| + | |||
| + | ~~~apache | ||
| + | < | ||
| + | ServerName jenkins.acme.fr | ||
| + | |||
| + | < | ||
| + | RewriteEngine On | ||
| + | RewriteCond %{HTTPS} !on | ||
| + | RewriteRule (.*) https:// | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | ServerName jenkins.acme.fr | ||
| + | |||
| + | SSLEngine On | ||
| + | SSLCertificateFile / | ||
| + | SSLCertificateKeyFile / | ||
| + | SSLCertificateChainFile / | ||
| + | SSLProtocol all -SSLv2 -SSLv3 | ||
| + | SSLHonorCipherOrder on # apache 2.1+ | ||
| + | |||
| + | < | ||
| + | | ||
| + | | ||
| + | </ | ||
| + | |||
| + | ProxyPass | ||
| + | ProxyPassReverse | ||
| + | ProxyPassReverse | ||
| + | ProxyRequests | ||
| + | ProxyPreserveHost | ||
| + | AllowEncodedSlashes NoDecode | ||
| + | </ | ||
| + | |||
| + | ~~~ | ||
| + | |||
| + | Ou moins impactant | ||
| + | ~~~apache | ||
| + | < | ||
| + | ServerName jenkins.acme.fr | ||
| + | |||
| + | < | ||
| + | | ||
| + | | ||
| + | </ | ||
| + | |||
| + | ProxyPass | ||
| + | ProxyPassReverse | ||
| + | </ | ||
| + | |||
| + | ~~~ | ||
