# 5. Webmin ## Installation ```bash curl -o setup-repos.sh https://raw.githubusercontent.com/webmin/webmin/master/setup-repos.sh sh setup-repos.sh rm setup-repos.sh apt update && apt install webmin ``` ## Configurer le compte admin Remplacer `root` par `` dans : - `/etc/webmin/miniserv.users` - `/etc/webmin/webmin.acl` ```bash sed -i 's/root:/:/' /etc/webmin/miniserv.users sed -i 's/root:/:/' /etc/webmin/webmin.acl service webmin restart ``` ## Desactiver SSL natif (utiliser proxy Apache) Webmin a des problemes avec SSL sur certaines versions. Utiliser un proxy Apache : ```bash sed -i 's/ssl=1/ssl=0/' /etc/webmin/miniserv.conf ``` Ajouter dans `/etc/webmin/config` : ``` webprefixnoredir=1 relative_redir=1 ``` Ajouter dans `/etc/webmin/miniserv.conf` : ``` referers=webmin. redirect_port=443 redirect_ssl=1 ``` ```bash systemctl restart webmin ``` ## Creer le sous-domaine 1. DNS : A record `webmin` -> `` 2. ISPConfig > Sites > Subdomain (vhost) : - Hostname : `webmin` - Domain : `` - Web folder : `webmin` - SSL + Let's Encrypt - Rewrite HTTP to HTTPS 3. Apache Directives : ```apache Order deny,allow Allow from all ProxyRequests Off ProxyPass /stats ! ProxyPass /.well-known/acme-challenge ! SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1 ProxyPreserveHost On ProxyPass / http://localhost:10000/ ProxyPassReverse / http://localhost:10000/ RedirectMatch ^/$ https://webmin. ``` ## Ajouter le port au firewall ISPConfig > System > Firewall : ajouter `10000` aux TCP ports. ## Acces ``` https://webmin. ```