SolvedMeshCentral Apache reverse proxy

AFAYK there's any chance to make MC (agents, web UI, console, file, and so on....) work through apache reverse proxy? Thanks!

39 Answers

✔️Accepted Answer

My fully working config files for Apache and MC.

<VirtualHost *:443>

        ServerName mesh.mydomain.tld
        ServerAdmin postmaster@mydomain.tld

	Alias /robots.txt /var/www/html/robots.txt

        RewriteEngine on
        RewriteCond %{HTTP:Upgrade} websocket [NC]
        RewriteCond %{HTTP:Connection} upgrade [NC]
        RewriteRule . "ws://127.0.0.1:8081%{REQUEST_URI}" [P]

        ProxyPassMatch ^/robots.txt !
        ProxyPass / http://127.0.0.1:8081/ connectiontimeout=86400 timeout=30
        ProxyPassReverse / http://127.0.0.1:8081/
        ProxyPreserveHost On

        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined

        SSLEngine on

        SSLCertificateFile /etc/letsencrypt/live/mesh.mydomain.tld/fullchain.pem
        SSLCertificateKeyFile /etc/letsencrypt/live/mesh.mydomain.tld/privkey.pem
        SSLCACertificateFile /etc/letsencrypt/live/mesh.mydomain.tld/chain.pem
        SSLUseStapling on

 </VirtualHost>
{
  "settings": {
    "cert": "mesh.mydomain.tld",
    "Port": 8081,
    "RedirPort": 8082,
    "AliasPort": 443,
    "AgentPong": 300,
    "TLSOffload": "127.0.0.1",
    "Minify": 1,
    "Wanonly": true
  },
  "domains": {
    "": {
        "newAccounts" : 0,
        "certUrl": "https://mesh.mydomain.tld"
    }
  }
}

Related Issues:

3
MeshCentral Apache reverse proxy
My fully working config files for Apache and MC. AFAYK there's any chance to make MC (agents web UI ...