How to setup rules for all requests in nginx?

What issue or error are you experiencing?

Inside my conf/nginx/site.conf.hbs, I am trying to add a rule to add redirect rules to all incoming requests. I have added the below rules there.

location / {
    # Added my rules here.
}

However, after restarting the site, I am getting a 503 error on the website. Only after removing this particular rule, and restating solves the issue. I am not sure how to resolve this, because I believe the above rule should be enough to setup redirects for all requests. Can anyone please help direct me if I am missing anything?


Local Logs

Nothing getting triggered in the logs either for me.


Hi @rajinsharwar

It is tough to say for certain but often NGINX errors like these can be down to a problem with syntax or configuration. Have you done any troubleshooting along those lines?

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.