在OS X El Capitan上更改Apache DocumentRoot后拒绝连接

时间:2015-11-08 02:25:14

标签: apache

我正在使用OS X El Capitan,并更改了Apache2配置文件/etc/apache2/http.conf以重新定位文件路径。

我修改了     DocumentRoot“/ Library / WebServer / Documents” 至     DocumentRoot“〜/ Dropbox / myweb”和

<Directory "Library/WebServer/Documents"> 

<Directory "~/Dropbox/myweb">. 

目录内容

Options FollowSymLinks Multiviews
MultiviewsMatch Any
AllowOverride None
Require all granted

并更改了

这样的文件夹
sudo chmod 777 ~/Dropbox/myweb

我重新启动了Apache,然后我再也无法连接到http://localhost了。 Opera回归我

Opera's connection attempt to localhost was rejected. The website may be down, or your network may not be properly configured.

Chrome让我回复

This webpage is not available
ERR_CONNECTION_REFUSED

我不确定我是否错过任何一步?

1 个答案:

答案 0 :(得分:0)

尝试运行apachectl configtest以确定您的配置是否正常。这里遇到了同样的问题,configtest告诉我httpd-userdir.conf文件中出错了。

相关问题