Magento 2, what are the Magento 2 rules to be added & where to run Magento 2 in Nginx.

My server guy asked me to add rule in mnt/data/home/xyz/redirector.conf file

But I am unaware of the what rules to be added in it.

My server Home page is working fine by all internal pages are 404

1 Answer 1


In Magento's root directory you can find a file called nginx.conf.sample which should contain all you need. Just give your server guy that file he should know what to do with it.

You can find the file also in the Magento github repository, for example the file of the current 2.4-development branch is located here: https://github.com/magento/magento2/blob/2.4-develop/nginx.conf.sample

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.