Fron my test server I can access files from:

But my companies server has shows me this restricting message

enter image description here

What could be the cause of this?

1 Answer 1


In your magento nginx config add file name as below:

# PHP entry point for main application
location ~ (index|get|static|report|404|503|testfile)\.php$ {
    try_files $uri =404;
    fastcgi_pass   fastcgi_backend;
    fastcgi_buffers 1024 4k;

    fastcgi_read_timeout 600s;
    fastcgi_connect_timeout 600s;

    fastcgi_index  index.php;
    fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
    include        fastcgi_params;

Run below command:

service nginx restart
  • Is there a specific location that I have to put the file in or can It be in the root folder? Apr 13, 2018 at 11:25
  • It be in your root folder but you need to give reference in your server etc/config.d/your host config file so magento will fetch configration from your root nginx.config file Apr 13, 2018 at 14:47

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.