Ben*_*son 11 apache permissions osx-mountain-lion
我已按照本教程在Mac OS X 10.8上设置Apache,MySql和PHP(http://coolestguyplanettech.com/downtown/install-and-configure-apache-mysql-php-and-phpmyadmin-osx-108-mountain - 狮子)
当我去'Localhost'时,我收到以下错误:
Forbidden
You don't have permission to access / on this server.
当我去'Localhost/~benthompson'时它工作正常.
当我在教程的中途,"Localhost"确实有效,稍后它会停止工作.
据推测它是一个权限问题,但在哪里?
小智 34
要修复该问题,请查看此链接http://www.coolestguidesontheplanet.com/downtown/how-set-virtual-hosts-apache-mac-osx-109-mavericks-and-osx-108-mountain-lion 阅读"丢失" Localhost"部分.
在httpd.conf文件中启用vhost后立即发生错误.通过取消注释这一行:
Include /private/etc/apache2/extra/httpd-vhosts.conf
在httpd-vhosts.conf中添加它将解决您的问题.请记住在此之前添加新的虚拟主机:D
<VirtualHost *:80> 
   ServerName localhost
   DocumentRoot /Library/WebServer/Documents/
</VirtualHost>
我希望这能解决你的问题!
| 归档时间: | 
 | 
| 查看次数: | 31533 次 | 
| 最近记录: |