Welcome to Centmin Mod Community
Become a Member

Nginx error_page Question

Discussion in 'Nginx, PHP-FPM & MariaDB MySQL' started by Jimmy, May 26, 2016.

  1. Jimmy

    Jimmy Premium Member Premium Member

    1,026
    231
    63
    Oct 24, 2015
    East Coast USA
    Ratings:
    +555
    Local Time:
    2:34 AM
    1.13.x
    MariaDB 10.1.x
    I'm trying to modify the errorpage.conf to point to a dynamic link vs. the error pages in Centmin Mod.

    Using 403 as an example.

    I'm trying to send the error page to this link: https://10.0.0.123/403 I can easily do that with the code below:

    Code:
    error_page 403 = https://10.0.0.123/403;
    The problem is that it shows up in the browser location bar as https://10.0.0.123/403 when I would like it not to show.

    I tried what is below but it didn't work.

    Code:
    error_page 403 = https://10.0.0.123/403;
    
    location = https://10.0.0.123/403 {
    access_log              off;
    internal;
    }
    If anyone has any ideas on how I can make this work, please let me know.

    Thanks!
     
  2. eva2000

    eva2000 Administrator Staff Member

    29,053
    6,594
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,790
    Local Time:
    4:34 PM
    Nginx 1.13.x
    MariaDB 5.5
    i believe error_page only accepts relative paths not absolute urls so location = /403 but seems you can actually Module ngx_http_core_module
     
    Last edited: May 26, 2016
    • Informative Informative x 1