Page 1 of 1

Hide .user.ini

Posted: Thu Jul 05, 2018 10:34 pm
by mrluisiko99
How can I hide .user.ini file in Wordpress installation?
I've tried to include that different ways on /home/username/conf/web/website.nginx.conf:

---
location ~ \.user\.ini$ {
deny all;
}

---
location ~ ^/\.user\.ini {
deny all;
}

---
And to add ini on htaccess and htpasswd:

location ~* "/\.(htaccess|htpasswd|ini)$" {
deny all;
return 404;
}

---

How can I hide it? Should it be included with Wordpress template?

Re: Hide .user.ini

Posted: Fri Jul 06, 2018 6:36 am
by gmalets
mrluisiko99 wrote:
Thu Jul 05, 2018 10:34 pm
I've tried to include that different ways on /home/username/conf/web/website.nginx.conf:
Do you using http or https protocol?
If https then you need to edit /home/username/conf/web/website.nginx.ssl.conf

Code: Select all

location ~ ^/\.user\.ini {
deny all;
}
and then "systemctl restart nginx"