apache http常见问题

apache http常见问题

1. 想通过apache下载文件,设置目录后无法访问。

Forbidden
You don't have permission to access / on this server.

Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.

修改/etc/httpd/conf.d/welcome.conf

把'-'去掉,Indexes表示没有index文件时,显示当前目录
<LocationMatch "^/+$">
    Options -Indexes--->Options Indexes
    ErrorDocument 403 /.noindex.html
</LocationMatch>

2.文件名过长显示不全

文件名过常显示不全
CentOS-7-x86_64-DVD-..>	2016-10-28 15:02	4.0G	 

修改/etc/httpd/conf.d/autoindex.conf

IndexOptions FancyIndexing HTMLTable VersionSort后面添加Namewidth=*

后续遇到问题会继续补充
发布了65 篇原创文章 · 获赞 48 · 访问量 2万+

猜你喜欢

转载自blog.csdn.net/DoloresOOO/article/details/98863249