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.
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
.Find the document for setting the site directory and change it to
Options Indexes FollowSymLinks Multiviews