我有一个问题,因为我将macOS X更新为高山脉版本,运行apache service时遇到了一些问题。当我尝试在本地访问此URL http://social.demo时,我有禁止页面 social.demo是Laravel制作的项目
运行此命令时:
const item = require('../my-module/items/item');
它向我返回此错误:
apachectl configtest
所以我签入/ ect / hosts
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
似乎还可以 我尝试在此文件“ /private/etc/apache2/extra/httpd-userdir.conf”中取消注释,然后重新启动apache服务
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
~
即使我尝试http://localhost,我也有禁止访问的页面
我不需要寻找...
编辑:这是我的httpd-vhost.conf
#Include /private/etc/apache2/users/*.conf
答案 0 :(得分:0)
我的解决方法是:
请检查“ /private/etc/apache2/extra/httpd-userdir.conf”文件。更改
#Include /private/etc/apache2/users/*.conf
到
Include /private/etc/apache2/users/*.conf
并编辑您的“ /etc/apache2/httpd.conf”
更改
Options FollowSymLinks Multiviews
到
Options FollowSymLinks Multiviews Indexes
最终您的文档根目录将如下所示,
DocumentRoot "/Library/WebServer/Documents"
<Directory "/Library/WebServer/Documents">
Options FollowSymLinks Multiviews Indexes
MultiviewsMatch Any
AllowOverride All
Require all granted
重新启动apache
sudo apachectl restart