https://github.com/jaapmarcus/nginx-secure-link
Wordpress plugin that rewrite that hashes all video urls to prevent hot linking. Also including templates for HestiaCP to set it up very easy
https://github.com/jaapmarcus/nginx-secure-link
hestiacp nginx wordpress
Last synced: 9 months ago
JSON representation
Wordpress plugin that rewrite that hashes all video urls to prevent hot linking. Also including templates for HestiaCP to set it up very easy
- Host: GitHub
- URL: https://github.com/jaapmarcus/nginx-secure-link
- Owner: jaapmarcus
- Created: 2020-05-28T10:01:09.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-01-08T17:44:08.000Z (over 3 years ago)
- Last Synced: 2025-05-06T00:03:14.298Z (about 1 year ago)
- Topics: hestiacp, nginx, wordpress
- Language: PHP
- Homepage:
- Size: 14.6 KB
- Stars: 4
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# nginx-secure-link
## Changes to nginx / sites config
Add the following code to the server -> location of the domain config of Nginx
location ~* ^.+\.(mp4|webm|mp3|ogg|ogv)$ {
proxy_cache off;
secure_link $arg_md5,$arg_expires;
secure_link_md5 "$secure_link_expires$uri secret-pass";
if ($secure_link = "") {
return 403;
}
if ($secure_link = "0") {
return 403;
}
root %sdocroot%;
access_log /var/log/%web_system%/domains/%domain%.log combined;
access_log /var/log/%web_system%/domains/%domain%.bytes bytes;
}