search

Home  >  Q&A  >  body text

macos - Apache on mac cannot view project

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.

巴扎黑巴扎黑2749 days ago684

reply all(2)I'll reply

  • PHP中文网

    PHP中文网2017-05-16 17:03:42

    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.

    reply
    0
  • 给我你的怀抱

    给我你的怀抱2017-05-16 17:03:42

    sudo vi /etc/httpd.conf

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

    reply
    0
  • Cancelreply