From HerzbubeWiki
Jump to: navigation, search

Debian packages

The following Debian packages need to be installed







After installation, ajaxterm listens on port 8022. The port can be changed in


I changed the port to 9000 because ports in the 8000-8999 range are reserved for domain-based services.

Proxying from 443

By default, ajaxterm will only bind to localhost, on port 8022, and thus will not be accessable from any other computer apart from localhost. In addition, ajaxterm only runs simple HTTP and is not secure.

In order to fix these problems, we create a proxy configuration for Apache that forwards connections on port 443 (https) to the ajaxterm service listening on port 9000. The configuration is made in


and looks like this:

<IfModule mod_ssl.c>
  <IfModule mod_proxy.c>
    # Rely on the general configuration file having enabled the
    # reverse proxy through the "ProxyRequests Off" directive
    ProxyPass /ajaxterm/ http://localhost:9000/
    ProxyPassReverse /ajaxterm/ http://localhost:9000/
    <Location /ajaxterm/>
      Require all granted

As we can see, this configuration relies on some other file providing the directive:

<IfModule mod_proxy.c>
  ProxyRequests Off

Protecting access through .htpasswd

To protect the ajaxterm console from unauthorized access, we could provide another level of security by requiring the user to authenticate through the browser first (.htpasswd password protection). Since this is just another layer of security indirection I currently don't implement this feature.

Larger Terminal Window

This chapter copied verbatim from http://wiki.kartbuilding.net/index.php/Ajaxterm.

To get ajaxterm to use a larger terminal window within the browser, the following files need to be edited:

vi /usr/share/ajaxterm/ajaxterm.html
window.onload=function() {
vi /usr/share/ajaxterm/ajaxterm.py
def __init__(self,width=100,height=40):

You may have to restart ajaxterm for the above to work.