How to avoid error 500 when using return 403

Discussion in 'General' started by computerwuffi, Mar 19, 2026 at 6:36 PM.

  1. computerwuffi

    computerwuffi New Member

    hello, i am using the newest ispconfig-panel with nginx on an debian13 VPS. I want to block countrys with geoip, like
    if ($blocked_country) {
    return 403;
    }
    that works fine if custom error sites not enabled. But when enabled i got error 500 instead of 403.
    I have fastcgi_intercept_errors on; in nginx.conf and tried various syntax like error_page 403 /error/403.html; in the nginx-options within ispconfig, but nothing will work for me. Does anyone have a tip on how I should proceed ? Thanks
     

Share This Page