虚拟主机突然停止工作OSX 10.10

时间:2016-10-27 16:09:06

标签: php macos apache virtualhost

几个月前,我使用this tutorial在Apache上设置了虚拟主机,并且它一直运行良好。在开发WordPress网站时,我遇到了PHP错误,突然间我的虚拟主机停止工作了。

Apache工作正常,我可以在http://localhost/~username/访问我的网站但是当我访问我的任何虚拟主机时,我得到了一个"拒绝连接" "网站无法访问错误"。

执行httpd -S表示所有虚拟主机似乎都在工作,但我无法在浏览器中访问它们:

jimmy-pages-iMac:users maikunari$ httpd -S
VirtualHost configuration:
*:80                   is a NameVirtualHost
     default server church.dev (/Users/maikunari/Hosts/church.conf:1)
     port 80 namevhost church.dev (/Users/maikunari/Hosts/church.conf:1)
     port 80 namevhost groovysite.dev (/Users/maikunari/Hosts/groovysite.conf:1)
     port 80 namevhost home.dev (/Users/maikunari/Hosts/home.conf:1)
     port 80 namevhost localnetwork.dev (/Users/maikunari/Hosts/localnetwork.conf:1)
     port 80 namevhost mycoolsite.dev (/Users/maikunari/Hosts/mycoolsite.conf:1)
     port 80 namevhost mygroovysite.dev (/Users/maikunari/Hosts/mygroovysite.conf:1)
     port 80 namevhost myothercoolsite.dev (/Users/maikunari/Hosts/myothercoolsite.conf:1)
     port 80 namevhost surovek.dev (/Users/maikunari/Hosts/surovek.conf:1)
     port 80 namevhost testing.dev (/Users/maikunari/Hosts/testing.conf:1)
     port 80 namevhost various.dev (/Users/maikunari/Hosts/various.conf:1)
     port 80 namevhost wordpress.dev (/Users/maikunari/Hosts/wordpress.conf:1)
ServerRoot: "/usr"
Main DocumentRoot: "/Users/maikunari/Sites"
Main ErrorLog: "/private/var/log/apache2/error_log"
Mutex ssl-stapling: using_defaults
Mutex ldap-cache: using_defaults
Mutex proxy: using_defaults
Mutex ssl-cache: using_defaults
Mutex authn-socache: using_defaults
Mutex default: dir="/private/var/run/" mechanism=default 
Mutex mpm-accept: using_defaults
Mutex cache-socache: using_defaults
Mutex authdigest-opaque: using_defaults
Mutex watchdog-callback: using_defaults
Mutex proxy-balancer-shm: using_defaults
Mutex ssl-stapling-refresh: using_defaults
Mutex rewrite-map: using_defaults
Mutex authdigest-client: using_defaults
PidFile: "/private/var/run/httpd.pid"
Define: DUMP_VHOSTS
Define: DUMP_RUN_CFG
User: name="maikunari" id=501 not_used
Group: name="staff" id=20 not_used

我从这里加载我的虚拟主机:Include /Users/maikunari/Hosts/*.conf 我已在/Users/maikunari/Sites/

上设置了777的权限

正如我所说,在上述错误发生之前一直工作正常,我不知道文件是否已损坏,权限错误?

如何进一步排除故障?如果需要更多信息,请告诉我。

更新 我发现通过在httpd.conf中将端口更改为8080并且虚拟主机文件使虚拟主机再次显示在浏览器中,但我不确定原因。这是否意味着其他东西正在使用端口80?

0 个答案:

没有答案