nginx prohibits access to files with certain suffixes

WBOY
Release: 2016-08-08 09:26:41
Original
1983 people have browsed it

Some configuration files in the web project, such as ini files, cfg files, or static template dwt, lbi files, etc., need to be set to prohibit access, otherwise they can be downloaded directly from the browser.

location ~* \.(ini|cfg|dwt|lbi)$ {  
     deny all;  
}  
Copy after login

The above introduces nginx's prohibition on accessing files with certain suffixes, including the content. I hope it will be helpful to friends who are interested in PHP tutorials.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!