Fortinet white logo
Fortinet white logo

Handbook

Configuring error pages

Configuring error pages

When backend real servers are unavailable or another status code for other module (ex: WAF/DoS/Auth), FortiADC can respond to clients attempting HTTP/HTTPS connections with a customized HTML error page. From the Application Resources > Error Page, you can create a customized error page by uploading an HTML error page file. You can then edit and preview the HTML file from the GUI. Once the HTML error page has been created, you can select it in virtual server configurations.

To aid you in customizing your HTML error page, FortiADC provides all default error page files that can be downloaded from the predefined profile LB_ERROR_PAGE_DEFAULT. You may use any of these default error page files as a template for customization.

The current error page file package only requests index.html to replace 503 error message when there are no servers in the pool. We also extend the support to these files listed below:

File Name

MUST

Guidelines

Index.html

Yes

This page will replace 503 error message page.

200.html

No

This page will replace 200 error message page.

202.html

No

This page will replace 202 error message page.

205.html

No

This page will replace 205 error message page.

400.html

No

This page will replace 400 error message page.

401.html

No

This page will replace 401 error message page.

403.html

No

This page will replace 403 error message page.

404.html

No

This page will replace 404 error message page.

405.html

No

This page will replace 405 error message page.

406.html

No

This page will replace 406 error message page.

408.html

No

This page will replace 408 error message page.

410.html

No

This page will replace 410 error message page.

413.html

No

This page will replace 413 error message page.

500.html

No

This page will replace 500 error message page.

501.html

No

This page will replace 501 error message page.

502.html

No

This page will replace 502 error message page.

504.html

No

This page will replace 504 error message page.

waf_deny.html

No

This page will replace all response to a WAF deny action. The error page will show the Message ID, Signature ID, and Client IP of the attack in the message as recorded in the attack log.

The error page file does not include the related response-code.html.

default.html

No

This page will replace all other error page doesn’t include in the package (excluding 503).

Alternatively, you do not have to create an HTML error page if you want to simply send a basic text error message when backend servers are unavailable. Instead, you can enter an error message in a text box from within the virtual server configuration. See Error Message.

Before you begin:
  • You must have Read-Write permission for Server Load Balance settings.
  • Copy the error message file to a location you can reach from your browser; the error page file must be named index.html and contained in a tar, tar.gz, or zip file. The maximum file size is 1 MB.
To upload an error message file:
  1. Go to Server Load Balance > Application Resources.
  2. Click the Error Page tab.
  3. Click Create New to display the configuration editor.
  4. Enter the name of the error page. You will use this name to select the error page in virtual server configurations. No spaces.
  5. Click Choose File and browse and select the error message tar, tar.gz, or zip file. The maximum file size is 1MB.
  6. Enter the Virtual Path of the error page. This virtual path will conflict with the custom authentication form base page's virtual path and also with SAML's server URL configuration and Captcha path.
  7. Click Save.
    The newly created error page will be listed in the Error Page tab.
To modify an error page:
  1. Go to Server Load Balance > Application Resources.
  2. Click the Error Page tab.
  3. Double-click the error page or select the (edit) icon in the row of the error page that you want to modify.
    The Error Page configuration editor displays.
  4. From the configuration editor, you can make the following modifications:
    • Upload a new error message file.
    • If the uploaded file is a zip file, edit the file directly through the text editor. The GUI text editor supports HTML, CSS, and JS file types.
  5. Optionally, click Preview to test and view your HTML error page.
    Note: The preview function only supports HTML files and cannot execute any JavaScript contained in the HTML.
  6. Click Save.

Note: While it is possible to modify the error message file, once an error page is created, you cannot modify its name.

Configuring error pages

Configuring error pages

When backend real servers are unavailable or another status code for other module (ex: WAF/DoS/Auth), FortiADC can respond to clients attempting HTTP/HTTPS connections with a customized HTML error page. From the Application Resources > Error Page, you can create a customized error page by uploading an HTML error page file. You can then edit and preview the HTML file from the GUI. Once the HTML error page has been created, you can select it in virtual server configurations.

To aid you in customizing your HTML error page, FortiADC provides all default error page files that can be downloaded from the predefined profile LB_ERROR_PAGE_DEFAULT. You may use any of these default error page files as a template for customization.

The current error page file package only requests index.html to replace 503 error message when there are no servers in the pool. We also extend the support to these files listed below:

File Name

MUST

Guidelines

Index.html

Yes

This page will replace 503 error message page.

200.html

No

This page will replace 200 error message page.

202.html

No

This page will replace 202 error message page.

205.html

No

This page will replace 205 error message page.

400.html

No

This page will replace 400 error message page.

401.html

No

This page will replace 401 error message page.

403.html

No

This page will replace 403 error message page.

404.html

No

This page will replace 404 error message page.

405.html

No

This page will replace 405 error message page.

406.html

No

This page will replace 406 error message page.

408.html

No

This page will replace 408 error message page.

410.html

No

This page will replace 410 error message page.

413.html

No

This page will replace 413 error message page.

500.html

No

This page will replace 500 error message page.

501.html

No

This page will replace 501 error message page.

502.html

No

This page will replace 502 error message page.

504.html

No

This page will replace 504 error message page.

waf_deny.html

No

This page will replace all response to a WAF deny action. The error page will show the Message ID, Signature ID, and Client IP of the attack in the message as recorded in the attack log.

The error page file does not include the related response-code.html.

default.html

No

This page will replace all other error page doesn’t include in the package (excluding 503).

Alternatively, you do not have to create an HTML error page if you want to simply send a basic text error message when backend servers are unavailable. Instead, you can enter an error message in a text box from within the virtual server configuration. See Error Message.

Before you begin:
  • You must have Read-Write permission for Server Load Balance settings.
  • Copy the error message file to a location you can reach from your browser; the error page file must be named index.html and contained in a tar, tar.gz, or zip file. The maximum file size is 1 MB.
To upload an error message file:
  1. Go to Server Load Balance > Application Resources.
  2. Click the Error Page tab.
  3. Click Create New to display the configuration editor.
  4. Enter the name of the error page. You will use this name to select the error page in virtual server configurations. No spaces.
  5. Click Choose File and browse and select the error message tar, tar.gz, or zip file. The maximum file size is 1MB.
  6. Enter the Virtual Path of the error page. This virtual path will conflict with the custom authentication form base page's virtual path and also with SAML's server URL configuration and Captcha path.
  7. Click Save.
    The newly created error page will be listed in the Error Page tab.
To modify an error page:
  1. Go to Server Load Balance > Application Resources.
  2. Click the Error Page tab.
  3. Double-click the error page or select the (edit) icon in the row of the error page that you want to modify.
    The Error Page configuration editor displays.
  4. From the configuration editor, you can make the following modifications:
    • Upload a new error message file.
    • If the uploaded file is a zip file, edit the file directly through the text editor. The GUI text editor supports HTML, CSS, and JS file types.
  5. Optionally, click Preview to test and view your HTML error page.
    Note: The preview function only supports HTML files and cannot execute any JavaScript contained in the HTML.
  6. Click Save.

Note: While it is possible to modify the error message file, once an error page is created, you cannot modify its name.