I have a server hosted by Altervista. Now since I don't want a file that I manage to be accessed by visitors, I wanted to put it outside of the root directory. I thought /var/www/
would work but it doesn't, or maybe I can't access at it.
Do you know how I can avoid users to access this file?
您可以使用密码通过子目录中的.htaccess和.htpasswd文件保护/var/www
子目录中的文件(此处描述的过程为https://davidwalsh.name/password-protect-directory-using-htaccess ,例如) 。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.