Error page customization

#1
I just did this on another box using nginx and was wondering if it was possible on my OLS box.

nginx vhost custom error page for all errors with variable showing error in html

Code:
error_page 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 421 422 423 424 425 426 428 429 431 451 500 501 502 503 504 505 506 507 508 510 511 /index.html;

location = /index.html {
    ssi on;
    internal;
    auth_basic off;
    root /config/www/_error_pages;
}
Some HTML
Code:
<h3><!--# echo var="status" default="" --></h3>


So I tried by starting with the one error page for all, but got this far without it functioning.

Code:
errorpage 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 421 422 423 424 425 426 428 429 431 451 500 501 502 503 504 505 506 507 508 510 511 {
  url /.error_pages/index.html
}
Code above works fine with only one error code. Haven't got to the variables part yet since I cannot get that working.

Any tips?
Thanks
 

Cold-Egg

Administrator
#2
Hi,

You can try adding it from web admin:
  1. Access to web admin at port 7080
  2. Click Virtual Hosts > Example > General.
  3. You should see there’s a Customized Error Pages section in the middle of the page. Click Add and choose e.g.404 Not Found as your Error Code and your costumed error page to URL location.
  4. Click Graceful Restart button to make it works.
Best
 
Top