hasse How can I protect image links with password?
If I copy the image link and log out I still can access the image link and see the photo.
It's a good question 👏 First of all, the reason Files Gallery doesn't protect your image links, is because it can't. It can control access to itself index.php
but it can't control access to all the other files on your server.
To protect your files, you must essentially block direct access to the files from your server. There are two ways:
1. Move the root
dir outside of your web server document root
If you point the Files Gallery root
dir outside of your web server document root, the files are not accessible by direct link. Instead, Files Gallery will load the files via PHP proxy, which means it can also control access to each file.
For example, if your website document root is /var/www/domain/public
you could create /var/www/domain/content
outside document root. Then you have /var/www/domain/public/index.php
with root config set to ../content
. This is just an example, and the structure depends on your server.
2. Block access to your files from server config
The other option is to block direct access to all files in theroot
dir from your Nginx or Apache config (or .htaccess file). This is quite common, and you can easily find a tutorial on Google that matches your server. Then, set config option load_files_proxy_php to true
so that Files Gallery can load files via PHP proxy for logged in users.