Ajenti behind Apache

All Ajenti URLs are absolute and start with /ajenti:, which makes it easy to reverse-proxy it with Apache.

Apache >= 2.2

Enabling modules:
sudo a2enmod proxy proxy_connect proxy_http headers

Config:
RequestHeader set Origin http://localhost:8000
ProxyPass /ajenti http://localhost:8000/
ProxyPassMatch ^/(ajenti:.*)$ http://localhost:8000/$1
ProxyPassReverse /ajenti /


Apache >= 2.4

Apache 2.4 adds support for Websockets proxying which will improve responsiveness of the panel. In addition to the 2.2 configuration, enable the module and add a socket proxy directive.
sudo a2enmod proxy_wstunnel
ProxyPass /ajenti:socket/1/websocket/ ws://localhost:8000/ajenti:socket/1/websocket/

This article was helpful for 10 people. Czy artykuł był pomocny?