Learn about Centmin Mod LEMP Stack today
Become a Member

Nginx Stop Nginx overriding statuses?

Discussion in 'Nginx, PHP-FPM & MariaDB MySQL' started by Liam W, Feb 7, 2015.

  1. Liam W

    Liam W Member

    62
    17
    8
    Jun 26, 2014
    United Kingdom
    Ratings:
    +22
    Local Time:
    1:25 PM
    nginx
    10.3.x
    If a PHP script sends a status that Nginx has an error doc for, it overrides the returned data and just displays the general error page...

    How do I stop this from happening?

    (XenForo to be more specific, I have the full friendly rewrites enabled, so normally a 404 would display the XF page, but it displays the Nginx custom one).

    Liam

     
  2. rdan

    rdan Well-Known Member

    5,443
    1,402
    113
    May 25, 2014
    Ratings:
    +2,194
    Local Time:
    9:25 PM
    Mainline
    10.2
    Un comment staticfiles.conf on your domain config.
     
  3. Liam W

    Liam W Member

    62
    17
    8
    Jun 26, 2014
    United Kingdom
    Ratings:
    +22
    Local Time:
    1:25 PM
    nginx
    10.3.x
    I was just coming to update this, I had already uncommented the static files config include.

    I had to also uncomment the errorpages include...

    Liam
     
  4. eva2000

    eva2000 Administrator Staff Member

    54,087
    12,177
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,735
    Local Time:
    11:25 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
  5. Liam W

    Liam W Member

    62
    17
    8
    Jun 26, 2014
    United Kingdom
    Ratings:
    +22
    Local Time:
    1:25 PM
    nginx
    10.3.x
  6. eva2000

    eva2000 Administrator Staff Member

    54,087
    12,177
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,735
    Local Time:
    11:25 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    ah that clears it up :)