linux:apache-proxy
Serveur Apache Proxy avec authentification
- Installer les utilitaires:
apt install apache2 apache2-utils - Editer le fichier d'apache
nano /etc/apache2/sites-enables/000...
et y modifier le contenu de la sorte
<VirtualHost *:80> ProxyPreserveHost On ProxyPass / http://serverlocal:port/ ProxyPassReverse / http://serverlocal:port/ Timeout 5400 ProxyTimeout 5400 ServerName server <Proxy *> Order deny,allow Allow from all Authtype Basic Authname "Password Required" AuthUserFile /etc/apache2/.htpasswd Require valid-user </Proxy> </virtualhost> - Créer un utilisateur
htpasswd -c /etc/apache2/.htpasswd <utilisateur>
- Activer les modules apache
a2enmod proxy a2enmod proxy_http
- Redémarrer apache
service apache2 restart
linux/apache-proxy.txt · Dernière modification : de root
