Form Templates

On the Webserver Protection > Reverse Authentication > Form Templates tab, you can upload HTML forms for Reverse Authentication. A form template can be assigned to an authentication profile with frontend mode Form. The respective form will be presented when users try to access a site path to which the authentication profile is assigned.

To add a form template, do the following:

  1. On the Form Templates tab, click New Form Template.

    The Add Form Template dialog box opens up.

  2. Specify the following settings:

    Name: Enter a descriptive name for the form template.

    Filename: Click the folder icon to upload an HTML template.

    Images/Stylesheets: Select and upload the images, stylesheets, or JavaScript files that are used by the form template.

    Comment (optional): Add a description or other information.

  3. Click Save.

    The new form template appears on the Form Templates list.

    You can now use it in your reverse authentication profiles.

To either edit or delete a form template, click the corresponding buttons.

Using Variables in Login Form Template

  • Required:

    A <form> element with it's method set to Post and it's action set to <?login_path?>, e.g. <form action="<?login_path?>" method="POST"> ... </form>

    An <input> element inside the above mentioned form with it's name set to httpd_username, e.g. <input name="httpd_username" type="text">

    An <input> element inside the above mentioned form with it's name set to httpd_password, e.g. <input name="httpd_password" type="password">

    Note – It is essential that any form template meets these three conditions so it can be parsed correctly (only <?login_path?> will actually be substituted).

  • Optional:

    All occurrences of <?assets_path?> will be replaced by the path containing all assets which have been uploaded alongside the form template. This allows for cleaner form templates by placing style sheets, images, etc. outside the actual form template, e.g. <link rel="stylesheet" type="text/css" href="<?assets_path?>/stylesheet.css">

    All occurrences of <?company_text?> and <?admin_contact?> will be replaced by the messages defined in Management > Customization, e.g. <p>If you encounter any problems or questions, please contact <b><?admin_contact?></b>.</p>

    All occurrences of <?company_logo?> will be replaced by the path leading to the image uploaded in Management > Customization, e.g. <img src="<?company_logo?>" alt="">

Sophos UTM on AWS includes a default form template to ease initial reverse authentication configuration and deployment. This is the form contained in the default form template object:





<link rel="stylesheet" type="text/css" href="<?assets_path?>/default_stylesheet.css">

<meta http-equiv="content-type" content="text/html; charset=UTF-8">




<div id="container">

<div class="info">

<img src="<?company_logo?>" alt="">



<form action="<?login_path?>" method="POST">

<p><label for="httpd_username">Username:</label>

<input name="httpd_username" type="text"></p>


<p><label for="httpd_password">Password:</label>

<input name="httpd_password" type="password"></p>


<p style="visibility:<?persistency?>">

<label for="httpd_persistency">Keep me logged in</label>

<input name="httpd_persistency" type="checkbox"></p>


<p><input type="submit" value="Login"></p>


<div class="note">If you encounter any problems or questions, please contact <b><?admin_contact?></b>.</div>