1

I have a drupal 7 installation with PDF module on NGINX server. I have a PDF.js field configured in all of the content types, PDF uploads through this goes to private (I NEED this as private). pdf.js viewer shows a 403 when upload path is set to private. But works fine when upload path is changed to public. I tried modifying .htaccess (my drupal is currently on localhost, also accessible through an IP):

Order Deny,Allow Deny from all Allow from localhost Satisfy Any

Also,

Order Allow, Deny Deny from all Allow from localhost

Also tried IP address in place of localhost, still nothing. I want pdf.js viewer to display private pdf files, but the pdf files should be inaccessible through their direct URL to both anonymous as well as authenticated users.

  • nginx does not use .htaccess files - those are only relevant to Apache web server. – Richard Smith Apr 22 '16 at 14:18
  • @Richard, I just found winginx.com which converts htaccess rules to nginx configuration. So am i doing the correct htaccess? – Ashwin B Apr 22 '16 at 18:47

Your Answer

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

Browse other questions tagged or ask your own question.