作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我不想使用 .htaccess。我应该如何更改我的目录属性?
<VirtualHost *:80>
ServerName abc.com
DocumentRoot /usr/share/uploads
<Directory " /usr/share/uploads">
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
最佳答案
如果您使用的是 Debian/Ubuntu,只需转到终端并输入
sudo a2dismod autoindex
sudo service apache2 restart
mv /etc/httpd/conf.d/autoindex.conf /etc/httpd/conf.d/autoindex.bkp
/etc/init.d/httpd restart
关于apache - 禁用 apache 上的目录列表;但应允许访问单个文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11136913/
我是一名优秀的程序员,十分优秀!