Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to disable parsing of php by Apache in linux

2025-01-22 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

This article is about how Apache forbids parsing php in linux. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.

If there is a loophole in the website, if someone uploads some * files on the website, it will be stored in the directory of the website, and it will be finished if it is parsed.

For example, if * uploads an info.php and we do not set the prohibition on parsing files uploaded by users in apache, then * will most likely see our configuration information in the browser.

We only need to limit these uploaded * * files, and there are two ways to limit them:

Upload is not allowed, but it is not appropriate. All users can't upload it.

Even after upload, no operation is allowed and parsing is not allowed.

The configuration is as follows:

# prohibit parsing of php to prevent the execution of * files

Php_admin_flag engine off

Order deny,allow

Deny from all

Note: engine off means not parsing the php file in the / data/www/data directory; deny from all means that no one can access the php file in this directory and download it, only 403 will be displayed

Thank you for reading! This is the end of the article on "how Apache forbids parsing php in linux". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it out for more people to see!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report