我遇到了问题
您无权访问此服务器上的/。 apache 2.4
访问我的本地网站时。我已经google了很多,并在StackOverflow中阅读了很多帖子,一切似乎都是正确的。
这是我的apache版本:
服务器版本:Apache / 2.4.27(Unix)
附上我的httpd.conf文件。 这是我的httpd-vhosts.conf:
<VirtualHost *:80>
ServerAdmin webmaster@localhost.smatchme.com
DocumentRoot "/Users/samuelrabini/Project/SmatchMe/smatchme.web"
ServerName localhost.smatchme.com
<Directory /Users/samuelrabini/Project/SmatchMe/smatchme.web>
Require all granted
Options Includes FollowSymLinks
AllowOverride All
</Directory>
DirectoryIndex index.php
ErrorLog "/private/var/log/apache2/localhost.smatchme.com-error_log"
CustomLog "/private/var/log/apache2/localhost.smatchme.com-access_log" common
</VirtualHost>
<VirtualHost *:80>
ServerAdmin webmaster@localhost.piuproduct.com
DocumentRoot "/Library/WebServer/Documents/piuproduct/public"
ServerName localhost.piuproduct.com
<Directory /Library/WebServer/Documents/piuproduct>
Require all granted
Options Includes FollowSymLinks
AllowOverride All
</Directory>
ErrorLog "/private/var/log/apache2/localhost.piuproduct.com-error_log"
CustomLog "/private/var/log/apache2/localhost.piuproduct.com-access_log" common
</VirtualHost>
<VirtualHost *:80>
ServerAdmin webmaster@localhost.b2b.com
DocumentRoot "/Library/WebServer/Documents/b2b.tony"
ServerName localhost.b2b.com
<Directory /Library/WebServer/Documents/b2b.tony>
AllowOverride All
Require all granted
</Directory>
ErrorLog "/private/var/log/apache2/localhost.b2b.com-error_log"
CustomLog "/private/var/log/apache2/localhost.b2b.com-access_log" common
</VirtualHost>
任何人都可以帮助我理解我做错了什么吗? 我正试图通过http://localhost.b2b.com/
访问我的网站我在/ etc / hosts中添加了条目:
127.0.0.1 localhost.b2b.com
提前谢谢
塞缪尔