50

apache2.4限定某个目录禁止解析PHP、限制user_agent、PHP相关配置-运维之路

 6 years ago
source link: http://blog.51cto.com/ccj168/2083993
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
限定某个目录禁止解析PHP对于使用PHP语言编写的网站,有一些目录是有需求上传文件的,比如服务器可以上传图片,并且没有做防盗链,所以就会被人家当成了一个图片存储服务器,并且盗用带宽流量。如果网站代码有漏洞,让黑客上传了一个用PHP代码写的木马,由于网站可以执行PHP程序,最终会让黑客拿到服务器权限,为了避免这种情况发生,我们需要把能上传文件的目录直接禁止解析PHP代码(不用担心会影响网站访问,若这

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK