We are happy to announce that Vesta is back under active development as of 25 February 2024. We are working on v1 candidate and expect to engage more with the community over the coming months. We are committed to open source, and we encourage contributors to help us build the future of Vesta.
Защита хотлинк
Re: Защита хотлинк
yariksat Спасибо, вот так заработало =))
Re: Защита хотлинк
yariksat wrote: ↑Tue May 23, 2017 5:20 pmВот мой конфиг полностьюКак видите в секции location у нас есть с Вами различия,у меня защита хотлинк вынесена в отдельную секцию.Code: Select all
server { listen xxx.xxx.xxx.xxx:443; server_name domains.ru www.domains.ru; ssl on; ssl_certificate /home/admin/conf/web/ssl.domains.ru.pem; ssl_certificate_key /home/admin/conf/web/ssl.domains.ru.key; resolver 8.8.8.8 8.8.4.4; resolver_timeout 10s; spdy_keepalive_timeout 300; spdy_headers_comp 9; ssl_stapling on; ssl_stapling_verify on; ssl_dhparam /home/admin/conf/web/dhparam.pem; add_header Strict-Transport-Security "max-age=31536000; includeSubDomains"; add_header X-Frame-Options SAMEORIGIN; add_header X-Content-Type-Options nosniff; error_log /var/log/apache2/domains/domains.ru.error.log error; location / { proxy_pass https://xxx.xxx.xxx.xxx:8443; } location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|tif|tiff|css|js|htm|html|ttf|otf|webp|woff|txt|csv|rtf|doc|docx|xls|xlsx|ppt|pptx|odf|odp|ods|odt|pdf|psd|ai|eot|eps|ps|zip|tar|tgz|gz|rar|bz2|7z|aac|m4a|mp3|mp4|ogg|wav|wma|3gp|avi|flv|m4v|mkv|mov|mpeg|mpg|wmv|exe|iso|dmg|swf)$ { root /home/admin/web/domains.ru/public_html; valid_referers none blocked server_names ~(yandex|google|yahoo|bing|facebook|fbcdn); if ($invalid_referer) { rewrite (.*)\.(jpg|jpeg|png|gif)$ https://domains.net/images/hotlink.png; } access_log /var/log/apache2/domains/.domains.log combined; access_log /var/log/apache2/domains/domains.ru.bytes bytes; expires max; try_files $uri @fallback; } location /error/ { alias /home/admin/web/domains.ru/document_errors/; } location @fallback { proxy_pass https://xxx.xxx.xxx.xxx:8443; } location ~ /\.ht {return 404;} location ~ /\.svn/ {return 404;} location ~ /\.git/ {return 404;} location ~ /\.hg/ {return 404;} location ~ /\.bzr/ {return 404;} disable_symlinks if_not_owner from=/home/admin/web/domains.ru/public_html; include /home/admin/conf/web/snginx.domains.ru.conf*; }
Скажи пожалуйста, а как не блокировать с определённых доменов хотлинк?
Re: Защита хотлинк
Наверно прописать домен в строку разрешенных.Jano wrote: ↑Wed Aug 05, 2020 11:13 amyariksat wrote: ↑Tue May 23, 2017 5:20 pmВот мой конфиг полностьюКак видите в секции location у нас есть с Вами различия,у меня защита хотлинк вынесена в отдельную секцию.Code: Select all
server { listen xxx.xxx.xxx.xxx:443; server_name domains.ru www.domains.ru; ssl on; ssl_certificate /home/admin/conf/web/ssl.domains.ru.pem; ssl_certificate_key /home/admin/conf/web/ssl.domains.ru.key; resolver 8.8.8.8 8.8.4.4; resolver_timeout 10s; spdy_keepalive_timeout 300; spdy_headers_comp 9; ssl_stapling on; ssl_stapling_verify on; ssl_dhparam /home/admin/conf/web/dhparam.pem; add_header Strict-Transport-Security "max-age=31536000; includeSubDomains"; add_header X-Frame-Options SAMEORIGIN; add_header X-Content-Type-Options nosniff; error_log /var/log/apache2/domains/domains.ru.error.log error; location / { proxy_pass https://xxx.xxx.xxx.xxx:8443; } location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|tif|tiff|css|js|htm|html|ttf|otf|webp|woff|txt|csv|rtf|doc|docx|xls|xlsx|ppt|pptx|odf|odp|ods|odt|pdf|psd|ai|eot|eps|ps|zip|tar|tgz|gz|rar|bz2|7z|aac|m4a|mp3|mp4|ogg|wav|wma|3gp|avi|flv|m4v|mkv|mov|mpeg|mpg|wmv|exe|iso|dmg|swf)$ { root /home/admin/web/domains.ru/public_html; valid_referers none blocked server_names ~(yandex|google|yahoo|bing|facebook|fbcdn); if ($invalid_referer) { rewrite (.*)\.(jpg|jpeg|png|gif)$ https://domains.net/images/hotlink.png; } access_log /var/log/apache2/domains/.domains.log combined; access_log /var/log/apache2/domains/domains.ru.bytes bytes; expires max; try_files $uri @fallback; } location /error/ { alias /home/admin/web/domains.ru/document_errors/; } location @fallback { proxy_pass https://xxx.xxx.xxx.xxx:8443; } location ~ /\.ht {return 404;} location ~ /\.svn/ {return 404;} location ~ /\.git/ {return 404;} location ~ /\.hg/ {return 404;} location ~ /\.bzr/ {return 404;} disable_symlinks if_not_owner from=/home/admin/web/domains.ru/public_html; include /home/admin/conf/web/snginx.domains.ru.conf*; }
Скажи пожалуйста, а как не блокировать с определённых доменов хотлинк?
Не знаю,проверять не на чем. Панели нет уже больше года.
Re: Защита хотлинк
У меня панель в которой уже встроен хотлинк. Мне без надобности лезть в конфиг.