【发布时间】:2018-12-11 18:18:17
【问题描述】:
我有一个问题,因为我将 macOS X 更新到高 sierra 版本我在运行 apache 服务时遇到了一些问题。当我尝试在本地访问此 url http://social.demo 时,我有禁止页面 social.demo 是一个使用 Laravel 制作的项目
当运行这个命令时:
apachectl configtest
它返回给我这个错误:
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using Alexiss-iMac.local. Set the 'ServerName' directive globally to suppress this message
Syntax OK
所以我签入 /ect/hosts
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost
127.0.0.1 api.demo
127.0.0.1 tv.demo
127.0.0.1 bo.demo
127.0.0.1 social.demo
127.0.0.1 website.demo
127.0.0.1 revive.demo
127.0.0.1 bo.demo
~
好像没问题 我尝试在此文件“/private/etc/apache2/extra/httpd-userdir.conf”中取消注释并重新启动apache服务
#Include /private/etc/apache2/users/*.conf
即使我尝试http://localhost我也有一个禁止页面
我不用去哪里找……
编辑:这里是我的 httpd-vhost.conf
<VirtualHost *:80>
DocumentRoot "/Users/alexisjqn//Documents/Ctor/public/"
ServerName http://social.demo/
SetEnv APPLICATION_ENV "development"
<Directory "/Users/alexisjqn//Documents/Ctor/public/">
DirectoryIndex index.php
AllowOverride All
Require all granted
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
【问题讨论】:
-
不确定,但您可以检查文件/目录权限。
-
@ab_ab 我将 /Library/WebServer/Documents/index.html.en 放在 777 中,并带有 chown root 但同样的问题...
-
我的意思是
storage的Directory Permissions和bootstrap/cache。 -
@ab_ab drwxrwxrwx 6 位 alexisjqn 员工负责这两个文件夹
-
权限问题是我的随机猜测。我对这方面了解不多。看看this。它可能会对你有所帮助。
标签: laravel macos apache localhost