• Hello everyone.

    Wordpress version: 5.3.2

    I am using WordPress with Nginx.

    I am looking for a plugin to prevent direct access (without being logged in) to files such as the pictures and videos that i previously uploaded.

    Do you know such a plugin, compatible with nginx ?

    Thanks in advance for your answers !

    Gavy.

    • This topic was modified 4 years, 7 months ago by Jan Dembowski. Reason: Moved to Fixing WordPress, this is not an Everything else WordPress topic
Viewing 4 replies - 1 through 4 (of 4 total)
  • Dion

    (@diondesigns)

    Unlike Apache, nginx does not support .htaccess files that can be modified by WordPress and its plugins. Its configuration is at the global level, and changing the configuration requires root/sudo access to the server. The nginx service must then be restarted to activate the changes, whereas changes to .htaccess files take effect immediately.

    Given how closely WordPress is tied to .htaccess files, the vast majority of people are better off using Apache (or a drop-in replacement such as Litespeed). Only those people with root access to a server, and the knowledge to manage that server, should consider using nginx with WordPress. (And in most of those cases, Apache/Litespeed would still be the better solution.)

    Thread Starter gavy1

    (@gavy1)

    Hi @diondesigns

    Thanks for these informations. So if i understand right, no plugin can help me, i have to found to add rules to NGginx. I’ll look into that.

    If someone has links that could help me, don’t hesitate ??

    hi @gavy1 You can try Prevent Direct Access plugin. Their paid version has supported Nginx. They will guide you on how to configure Nginx rules.

    Hope it helps,

    Thread Starter gavy1

    (@gavy1)

    I’ll take a look ! Thanks !

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Prevent direct access to files – Nginx’ is closed to new replies.