Skip to content

nginx should handle HTTP 403 to the backend, too #5

@franzenzenhofer

Description

@franzenzenhofer

/etc/nginx/sites-available/myapp-httpp

currently is:

location / {
root        /var/myapp/public;
index       index.html;
error_page  404 = @backend;
}

should:

location / {
root        /var/myapp/public;
index       index.html;
error_page  404 = @backend;
error_page  403 = @backend;
}

otherwise it is not possible return something from node.js on the root (i.e.: http://www.myapp.com/) of the domain, as nginx (if the 'public' folder exists) needs to handle an HTTP 403 instead of an HTTP 404.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions