简体   繁体   中英

prevent Access to Apache server web folder on EC2

Hi I have built a web platform on EC2 with apache as my web server I want to prevent access to my web folders In case someone trying to do www.mywebsite.com/include or www.mywebsite.com/includes/images I want him to be blocked

I understood I have to create Htacces file with some rule I have tried that with no success. If someone have good knowledge Ill to have a tutorial in case the answer won't be enough Thanks

I all ready described above

You can use the directive Location or Directory , you can have more information on the Apache documentation: Documentation Below is the block code for Apache 2.4.X

<Location /include>
  Require all denied
</Location>

<Location /includes/images>
  Require all denied
</Location>

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM