mac 下 apache2.14 显示目录列表

1.开启Apache

sudo apachectl start

2.配置Apache

  • 打开 Apche 的配置文件:/etc/apache2/httpd.conf
  • 找到 Options FollowSymLinks Multiviews
  • 改成 Options FollowSymLinks Multiviews Indexes
  • 保存

3.重启Apache

sudo apachectl restart 

4.使用

  • Apache 的根目录为 /Library/WebServer/Documents/
  • 如果 打开 http://localhost/ 显示 it work ,就把目录下的 index.html.en 删除或重命名为 非 .html 后缀
  • 以后把文件上传到这个文件夹就可以正常使用了
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容