Apache set up mac os yosemite



我试图让Apache在我的优胜美地机器上运行,但是当我尝试访问localhost时,我得到了 https://i.stack.imgur.com/ZzZzB.png。

我运行了一个 apache 配置测试并得到了以下内容

Angus-Mac:mysql root# apachectl configtest AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using Angus-Mac.local. Set the 'ServerName' directive globally to suppress this message Syntax OK

我做错了什么?有什么想法吗?

取消注释ServerName并将其更改为域名解决了问题。

将该

文件夹的组权限更改为_www

sudo chgrp -R _www /Library/WebServer/Documents (all web content is now group _www)
chmod -R go-rwx /Library/WebServer/Documents (nobody other than owner can access web content)
chmod -R g+rx /Library/WebServer/Documents (all web content is now readable/executable/enterable by _www)

然后重新启动 Apache似乎您在 httpd.conf 中的用户与 Web 目录中的用户不同

我在这里找到了解决方案

请取消注释第 212 行 (httpd.conf) 中的服务器名称,并将域 www.example.com 更改为您的域。重启阿帕奇

最新更新