Change error pages GLOBALLY

Discussion in 'Linux Support: RHEL, CentOS, SUSE etc' started by Weichtier, Aug 7, 2018.

  1. Weichtier

    Weichtier New Member

    Hey,
    First: My English is bad :p

    I installed Cyberpanel with auto installer on a Centos 7 lxc container.
    All works fine, but now i want to change the error pages to german...

    I found a few tutorials how, but nothing about how to change it globally (not .htaccess!!) like in an apache2 conf with ErrorDocument 404 /error/4o4.html or so....

    How can i do this, because i dont want to change it for each new site manually, and when the site owner puts his own and remove it, the default page (in english) will be shown? Ive already tried something like this:

    Code:
    rewrite{
    blahblah
    rewritefile /home/global/.htaccess
    }

    and put the ErrorDocument 404 (...) in the specified htaccess file, but that doesnt worked....
     
  2. lsqtwrk

    lsqtwrk New Member

    Hi,

    only rewrite rule works in OLS .htaccess

    for custom error page, you should:

    login webadmin, goes to virtual host, General , Customized Error Pages.

    1.JPG
     
  3. Weichtier

    Weichtier New Member

    That's exactly what I did not want ...
    I do not want to set the error pages for each vhost individually, but change them globally so that a new vhost immediately has the new error pages, and all existing ones too. I would like to have the standard by default in German, and my customers do not want to change that and so ...

    Translated by Google because of my excellent English (NOT) :p


    EDIT: Sorry, i dont saw that you marked "Vhost Templates"....
     
  4. Weichtier

    Weichtier New Member

    But a new problem: Which Vhost Template is used by Cyberpanel?
     
  5. lsqtwrk

    lsqtwrk New Member

    hmmmmm , I think it doesn't use template , but coded in /usr/local/CyberCP/plogical/vhost.py, i think you can add custom lines into there as well...
     
  6. Weichtier

    Weichtier New Member

  7. Weichtier

    Weichtier New Member

    Ok, next question: Where are the default error pages located? like /usr/local/lsws/html/error/{errorcode}.html or so...
     
  8. lsqtwrk

    lsqtwrk New Member

    the default error page is hard-coded , you will need to modify source code and re-compile it
     

Share This Page