The “Protected files” feature was created in order to provide a way for course creators to protect the files uploaded on their websites.
This way, any file (PDF, XLS, DOC, etc.) that you might be included as resources for courses will be protected from being shared by students or course participants.
In some cases, on websites hosted on the NGINX server, this server might not be correctly configured and, as a result, it will not allow Thrive Plugins to protect your files.
If that is your case, you will see a warning message when you access the “Protected files” dashboard.
How do I know if my website server is NGINX?
NGINX is an open-source web server. The way to see whether your website is hosted on it or not is very easy and you can check it for yourself if you need to.
Simply go to your site, right-click anywhere on it and go to the DevTools tab by clicking on “Inspect”:
In the “Network” tab, you can filter the information by “Doc”:
For example, if I go to the “show” doc, you’ll see the server in the header:
How do I fix the problem and allow the server to protect my files?
If you see that warning, you need to contact your hosting provider and ask them to make some modifications to the NGINX configuration. More specifically, the hosting provider should be able to find the relevant config file and add this code there:
server {
location ~ /thrive-protected-files {
deny all;
return 403;
}
}
My server is already protecting files by default, why would I do this extra step?
Sometimes, the server that your website is hosted on comes with file protection by default. If that’s the case, enabling file protection from Thrive Apprentice might seem useless.
The answer to this is that yes, if by default your server already protects your files, you should not have to take this extra step.
However, the server file protection system is created in a way that it will protect directories that can contain multiple files.
This means that in the rare case that someone has the exact URL to your file, they will still have access to it and be able to download it.
Enabling the protected files feature in Thrive Apprentice as well will simply add an extra layer of security over those files and you can be sure that, even if someone gets a hold of the URL of a protected file, they will still not have access to it.
Hopefully, this article was useful.