Page 1 of 1
How to Enable Hotlink Protection in Nginx + Php-fpm VestaCP
Posted: Sun Feb 24, 2019 5:41 am
by bhode18
How to Enable Hotlink Protection in Nginx + Php-fpm VestaCP ?
I'm currently using vestacp nginx + php-fpm
I got a hotlink protection tutorial at Nginx :
location ~ \.(jpe?g|png|gif)$ {
valid_referers none blocked example.com *.example.com;
if ($invalid_referer) {
return 403;
}
}
where is it installed ?
Re: How to Enable Hotlink Protection in Nginx + Php-fpm VestaCP
Posted: Sun Feb 24, 2019 7:03 am
by mehargags
You can add it in the location /home/user/config/web/domain.conf
or
better make a template for it.
Please do research a bit before posting such a basic question
Re: How to Enable Hotlink Protection in Nginx + Php-fpm VestaCP
Posted: Mon Feb 25, 2019 9:50 am
by HenrysCat
mehargags wrote: ↑Sun Feb 24, 2019 7:03 am
You can add it in the location /home/user/config/web/domain.conf
I assume you mean /home/admin/conf/web/ ?
In that folder there are 11 files
Code: Select all
/home/admin/conf/web/awstats.mydomain.com.conf
/home/admin/conf/web/nginx.mydomain.com.conf_letsencrypt
/home/admin/conf/web/mydomain.com.httpd.conf
/home/admin/conf/web/mydomain.com.httpd.ssl.conf
/home/admin/conf/web/mydomain.com.nginx.conf
/home/admin/conf/web/mydomain.com.nginx.ssl.conf
/home/admin/conf/web/snginx.mydomain.com.conf_letsencrypt
/home/admin/conf/web/ssl.mydomain.com.ca
/home/admin/conf/web/ssl.mydomain.com.crt
/home/admin/conf/web/ssl.mydomain.com.key
/home/admin/conf/web/ssl.mydomain.com.pem
So which file to edit and where in the file to place the code, beginning? end?
Re: How to Enable Hotlink Protection in Nginx + Php-fpm VestaCP
Posted: Thu Feb 28, 2019 7:59 am
by mehargags
/home/admin/conf/web/mydomain.com.nginx.conf
/home/admin/conf/web/mydomain.com.nginx.ssl.conf