Discover Centmin Mod today
Register Now

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

    59
    16
    8
    Jun 26, 2014
    Barrow-in-Furness, Cumbria, England
    Ratings:
    +21
    Local Time:
    6:46 AM
    nginx/1.9.11
    10.1.11
    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 Premium Member Premium Member

    4,244
    1,033
    113
    May 25, 2014
    Ratings:
    +1,481
    Local Time:
    1:46 PM
    Mainline
    10.2
    Un comment staticfiles.conf on your domain config.
     
    • Like Like x 1
  3. Liam W

    Liam W Member

    59
    16
    8
    Jun 26, 2014
    Barrow-in-Furness, Cumbria, England
    Ratings:
    +21
    Local Time:
    6:46 AM
    nginx/1.9.11
    10.1.11
    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

    35,559
    7,840
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +12,083
    Local Time:
    3:46 PM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    • Like Like x 1
  5. Liam W

    Liam W Member

    59
    16
    8
    Jun 26, 2014
    Barrow-in-Furness, Cumbria, England
    Ratings:
    +21
    Local Time:
    6:46 AM
    nginx/1.9.11
    10.1.11
  6. eva2000

    eva2000 Administrator Staff Member

    35,559
    7,840
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +12,083
    Local Time:
    3:46 PM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    ah that clears it up :)
     
..