Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/apache/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/webpack/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在OS X El Capitan上更改Apache DocumentRoot后连接被拒绝_Apache - Fatal编程技术网

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

在OS X El Capitan上更改Apache DocumentRoot后连接被拒绝,apache,Apache,我正在使用OS X El Capitan,并更改了Apache2配置文件/etc/Apache2/http.conf以重新定位文件路径 我修改了 DocumentRoot/Library/WebServer/Documents 到 DocumentRoot~/Dropbox/myweb,以及 <Directory "Library/WebServer/Documents"> 并将文件夹更改为 sudo chmod 777 ~/Dropbox/myweb 我重新启动了Apache

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

我修改了 DocumentRoot/Library/WebServer/Documents 到 DocumentRoot~/Dropbox/myweb,以及

<Directory "Library/WebServer/Documents"> 
并将文件夹更改为

sudo chmod 777 ~/Dropbox/myweb
我重新启动了Apache,然后无法再连接。歌剧还我

Opera's connection attempt to localhost was rejected. The website may be down, or your network may not be properly configured.
This webpage is not available
ERR_CONNECTION_REFUSED
铬还我

Opera's connection attempt to localhost was rejected. The website may be down, or your network may not be properly configured.
This webpage is not available
ERR_CONNECTION_REFUSED
我不确定是否遗漏了任何步骤?

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

我的configtest说语法正常。。。还有其他想法吗?