Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Main Section Web Server
  • Search

How to Enable Hotlink Protection in Nginx + Php-fpm VestaCP

Questions regarding the Web Server
Apache + Nginx, Nginx + PHP5-FPM
Post Reply
  • Print view
Advanced search
4 posts • Page 1 of 1
bhode18
Posts: 6
Joined: Tue Jun 27, 2017 10:37 am

How to Enable Hotlink Protection in Nginx + Php-fpm VestaCP
  • Quote

Post by bhode18 » Sun Feb 24, 2019 5:41 am

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 ?
Top

mehargags
Support team
Posts: 1096
Joined: Sat Sep 06, 2014 9:58 pm
Contact:
Contact mehargags
Website Skype

Os: Debian 8x
Web: apache + nginx
Re: How to Enable Hotlink Protection in Nginx + Php-fpm VestaCP
  • Quote

Post by mehargags » Sun Feb 24, 2019 7:03 am

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
Top

HenrysCat
Posts: 51
Joined: Sun Mar 25, 2018 7:25 pm

Os: CentOS 6x
Web: apache + nginx
Re: How to Enable Hotlink Protection in Nginx + Php-fpm VestaCP
  • Quote

Post by HenrysCat » Mon Feb 25, 2019 9:50 am

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?
Top

mehargags
Support team
Posts: 1096
Joined: Sat Sep 06, 2014 9:58 pm
Contact:
Contact mehargags
Website Skype

Os: Debian 8x
Web: apache + nginx
Re: How to Enable Hotlink Protection in Nginx + Php-fpm VestaCP
  • Quote

Post by mehargags » Thu Feb 28, 2019 7:59 am

/home/admin/conf/web/mydomain.com.nginx.conf
/home/admin/conf/web/mydomain.com.nginx.ssl.conf
Top


Post Reply
  • Print view

4 posts • Page 1 of 1

Return to “Web Server”



  • Board index
  • All times are UTC
  • Delete all board cookies
  • The team
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD
 

 

Login  •  Register

I forgot my password