change web root apache mac OS X

后端 未结 7 2007
执念已碎
执念已碎 2020-12-30 01:34

I cant change my web root in apache, for some reason it points to /Sites/folder1/folder2 instead of it pointing to /Sites. I configured and change my apache

7条回答
  •  爱一瞬间的悲伤
    2020-12-30 01:54

    I ran into this problem: Once you change the root of web server to somewhere other than the default (/Library/WebServer/Documents), you need setup virtual host, otherwise, localhost will not work, and you will get:
    403 Forbidden error
    You can refer to this link for details on how to set it up:
    http://coolestguidesontheplanet.com/set-virtual-hosts-apache-mac-osx-10-10-yosemite/

    Also make sure the following line is in the configuration file for the web directory if your Max is running OS X 10.10:
    Require all granted

    For your reference, I just remind you if this ever happens to you.

提交回复
热议问题