0

I am trying to access files from the root folder by the url like:
localhost/magento2.2.2/testfolder/test.php

and I can do it fine on my test server but in my company nginx forbids me from accessing any file.


Should I edit nginx.conf.sample or is there another solution?

0

The root of Magento 2 is the http/pub/.

Try to add a NginX configuration similar to this one:

# test.php
location = /magento2.2.2/testfolder/test.php {
    alias /full/path/to/the/file/test.php;
}
  • I think you don't need the equal sign but it didn't work – Konstantin Patroev Apr 7 '18 at 20:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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