当前位置:网站首页>Apache2配置对目录拒绝访问,但是可以访问里面文件的设置
Apache2配置对目录拒绝访问,但是可以访问里面文件的设置
2022-06-28 11:08:00 【soha_dong】
首先找到/etc/apache2/sites-available# 目录下的 "default" 这个文件夹。在里面添加你要设置的目录
<Directory /var/www/XXX>
Options FollowSymLinks
AllowOverride None
Order allow,deny
allow from all
</Directory>"Options FollowSymLinks"主要就是这句话很重要,默认是"Options FollowSymLinks"这样的
其实就是将Indexes去掉,Indexes表示若当前目录没有index.html就会显示目录结构,去掉就可以实现对当前目录的拦截
边栏推荐
- 拼接String集合中的字符串_基于Stream
- Secretary of the Ukrainian national security and National Defense Commission: will carry out precision strikes against targets in Russia
- How to use output in katalon
- Markdown -- basic usage syntax
- 基于验证码识别的机器学习项目captcha_trainer操作实践
- 李宏毅《机器学习》丨7. Conclusion(总结)
- 字符串 & 堆 & 方法区
- 实体转JSON时,值为null的字段的丢失问题
- 【SemiDrive源码分析】【X9芯片启动流程】32 - DisPlay模块分析 - RTOS侧
- Mongo数据库
猜你喜欢

Metersphere implements UI automation elements that are not clickable (partially occluded)

Threads and thread pools

Katalon global variable is referenced in testobject

How does ETF position affect spot gold price?
![[practice] 1364- implement a perfect waterfall flow component on the mobile terminal (with source code)](/img/e8/21d8d81a3d7b544687d6adc06ad4b1.png)
[practice] 1364- implement a perfect waterfall flow component on the mobile terminal (with source code)

【实战】1364- 实现一个完美的移动端瀑布流组件(附源码)

Zero foundation self-study SQL course | if function

Yann LeCun新论文:构建自动智能体之路

利用soapUI获取freemarker的ftl文件模板

Markdown -- basic usage syntax
随机推荐
MytipartFile与File的相互转换
【剑指Offer】49. 丑数
Datetime and logging module
Word、PDF、TXT文件实现全文内容检索需要用什么方法?
Blue Bridge Cup Maze (dfs+ backtracking)
论文阅读 (59):Keyword-Based Diverse Image Retrieval with Variational Multiple Instance Graph
Redis6 1: what problems can be solved by the introduction of NoSQL and redis?
获取系统当前日期
Splicing strings in the string collection_ Stream based
JS foundation 1-js introduction and operator
Installing MySQL database (CentOS) in Linux source code
Katalon global variable is referenced in testobject
MySQL (II)
Lihongyi, machine learning 7 Conclusion
Redis database
Threads and thread pools
Compareto() and equals() methods of BigDecimal class
MySQL installation configuration and solving the problem of forgetting root password when reinstalling MySQL
Making and using of dynamic library (shared library)
【实操】Appium Settings app is not running after 5000ms