macos - Apache on mac cannot view project
巴扎黑
巴扎黑 2017-05-16 17:01:42
0
2
683

I started the Mac's Apache service, changed the project path, and entered 127.0.0.1 to see the content of index.html under the path, but it seems that localhost shows it works! Then I cannot be seen under 127.0.0.1 The project files and both folders cannot be seen.

巴扎黑
巴扎黑

reply all(2)
洪涛

Put index.html 重命名 home.html.

When you access http://127.0.0.1, you are actually accessing the root directory without specifying a file. At this time apache 会根据 Directoryindex 指令的配置内容,去查找首页,如果找到就显示,没找到的话,再判断目录有没有 Indexes 选项,如果有就列出目录,否则返回 404.

给我你的怀抱
sudo vi /etc/httpd.conf

Find the document for setting the site directory and change it to
Options Indexes FollowSymLinks Multiviews

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template