Apache 服务器 Mac – 代理错误
Apache Server Mac – Proxy Error
我只是想为 Mac OS X Sierra 使用内置的 apache 服务器,以使用 http://localhost 域查看我的网站。跟踪我的日志时,出现以下错误:
max:ssl maxnelson$ ps -aef | grep httpd
0 571 1 0 Wed07PM ?? 0:01.06 /usr/sbin/httpd -D FOREGROUND -f /Library/Server/Web/Config/apache2/services/ACSServer.conf -E /var/log/apache2/services/ACSServer_error_log
70 572 571 0 Wed07PM ?? 0:00.09 /usr/sbin/httpd -D FOREGROUND -f /Library/Server/Web/Config/apache2/services/ACSServer.conf -E /var/log/apache2/services/ACSServer_error_log
0 574 1 0 Wed07PM ?? 0:01.30 /usr/sbin/httpd -D FOREGROUND -f /Library/Server/Web/Config/Proxy/apache_serviceproxy.conf -E /private/var/log/apache2/service_proxy_error.log
70 582 574 0 Wed07PM ?? 0:00.11 /usr/sbin/httpd -D FOREGROUND -f /Library/Server/Web/Config/Proxy/apache_serviceproxy.conf -E /private/var/log/apache2/service_proxy_error.log
70 583 574 0 Wed07PM ?? 0:00.01 /usr/sbin/httpd -D FOREGROUND -f /Library/Server/Web/Config/Proxy/apache_serviceproxy.conf -E /private/var/log/apache2/service_proxy_error.log
70 584 574 0 Wed07PM ?? 0:00.02 /usr/sbin/httpd -D FOREGROUND -f /Library/Server/Web/Config/Proxy/apache_serviceproxy.conf -E /private/var/log/apache2/service_proxy_error.log
70 585 574 0 Wed07PM ?? 0:00.02 /usr/sbin/httpd -D FOREGROUND -f /Library/Server/Web/Config/Proxy/apache_serviceproxy.conf -E /private/var/log/apache2/service_proxy_error.log
70 586 574 0 Wed07PM ?? 0:00.02 /usr/sbin/httpd -D FOREGROUND -f /Library/Server/Web/Config/Proxy/apache_serviceproxy.conf -E /private/var/log/apache2/service_proxy_error.log
70 8282 574 0 7:09PM ?? 0:00.01 /usr/sbin/httpd -D FOREGROUND -f /Library/Server/Web/Config/Proxy/apache_serviceproxy.conf -E /private/var/log/apache2/service_proxy_error.log
70 8296 574 0 7:10PM ?? 0:00.01 /usr/sbin/httpd -D FOREGROUND -f /Library/Server/Web/Config/Proxy/apache_serviceproxy.conf -E /private/var/log/apache2/service_proxy_error.log
70 8297 574 0 7:10PM ?? 0:00.02 /usr/sbin/httpd -D FOREGROUND -f /Library/Server/Web/Config/Proxy/apache_serviceproxy.conf -E /private/var/log/apache2/service_proxy_error.log
70 8298 574 0 7:10PM ?? 0:00.01 /usr/sbin/httpd -D FOREGROUND -f /Library/Server/Web/Config/Proxy/apache_serviceproxy.conf -E /private/var/log/apache2/service_proxy_error.log
501 36371 8333 0 7:32PM ttys001 0:00.00 grep httpd
max:ssl maxnelson$ sudo apachectl -k restart
httpd not running, trying to start
(48)Address already in use: AH00072: make_sock: could not bind to address [::]:80
(48)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
AH00015: Unable to open logs
max:ssl maxnelson$ tail -f /private/var/log/apache2/service_proxy_error.log
[Thu Jul 06 19:33:48.002767 2017] [proxy:error] [pid 582] (61)Connection refused: AH00957: HTTP: attempt to connect to 127.0.0.1:34580 (127.0.0.1) failed
[Thu Jul 06 19:33:48.002903 2017] [proxy_http:error] [pid 582] [client ::1:57056] AH01114: HTTP: failed to make connection to backend: 127.0.0.1, referer: http://localhost/
[Thu Jul 06 19:33:58.266146 2017] [proxy:error] [pid 585] (61)Connection refused: AH00957: HTTP: attempt to connect to 127.0.0.1:34580 (127.0.0.1) failed
[Thu Jul 06 19:33:58.266260 2017] [proxy_http:error] [pid 585] [client ::1:57060] AH01114: HTTP: failed to make connection to backend: 127.0.0.1
[Thu Jul 06 19:33:58.469431 2017] [proxy:error] [pid 584] (61)Connection refused: AH00957: HTTP: attempt to connect to 127.0.0.1:34580 (127.0.0.1) failed
[Thu Jul 06 19:33:58.469554 2017] [proxy_http:error] [pid 584] [client ::1:57061] AH01114: HTTP: failed to make connection to backend: 127.0.0.1, referer: http://localhost/d3-timeline-master/example
[Thu Jul 06 19:34:01.239357 2017] [proxy:error] [pid 8296] (61)Connection refused: AH00957: HTTP: attempt to connect to 127.0.0.1:34580 (127.0.0.1) failed
[Thu Jul 06 19:34:01.239655 2017] [proxy_http:error] [pid 8296] [client ::1:57062] AH01114: HTTP: failed to make connection to backend: 127.0.0.1, referer: http://localhost/
[Thu Jul 06 19:34:21.082799 2017] [reqtimeout:info] [pid 8297] [client ::1:57066] AH01382: Request header read timeout
[Thu Jul 06 19:34:21.082797 2017] [reqtimeout:info] [pid 586] [client ::1:57065] AH01382: Request header read timeout
[Thu Jul 06 19:38:38.439198 2017] [proxy:error] [pid 583] (61)Connection refused: AH00957: HTTP: attempt to connect to 127.0.0.1:34580 (127.0.0.1) failed
[Thu Jul 06 19:38:38.439354 2017] [proxy_http:error] [pid 583] [client ::1:57179] AH01114: HTTP: failed to make connection to backend: 127.0.0.1
[Thu Jul 06 19:38:39.539888 2017] [proxy:error] [pid 8298] (61)Connection refused: AH00957: HTTP: attempt to connect to 127.0.0.1:34580 (127.0.0.1) failed
[Thu Jul 06 19:38:39.540047 2017] [proxy_http:error] [pid 8298] [client ::1:57180] AH01114: HTTP: failed to make connection to backend: 127.0.0.1, referer: http://localhost/d3-timeline-master/example
很高兴提供更多信息,我已经尝试关注每篇文章并尽我所能在网上找到但没有成功。也许值得一提的是,我最近生成了一个新的自签名证书,但不确定这是否也会影响事情。非常感谢任何帮助。
应OP的要求,我把我的评论变成了答案。
你可能有其他进程监听80端口,用命令netstat -an | grep LISTEN
检查一下
我只是想为 Mac OS X Sierra 使用内置的 apache 服务器,以使用 http://localhost 域查看我的网站。跟踪我的日志时,出现以下错误:
max:ssl maxnelson$ ps -aef | grep httpd
0 571 1 0 Wed07PM ?? 0:01.06 /usr/sbin/httpd -D FOREGROUND -f /Library/Server/Web/Config/apache2/services/ACSServer.conf -E /var/log/apache2/services/ACSServer_error_log
70 572 571 0 Wed07PM ?? 0:00.09 /usr/sbin/httpd -D FOREGROUND -f /Library/Server/Web/Config/apache2/services/ACSServer.conf -E /var/log/apache2/services/ACSServer_error_log
0 574 1 0 Wed07PM ?? 0:01.30 /usr/sbin/httpd -D FOREGROUND -f /Library/Server/Web/Config/Proxy/apache_serviceproxy.conf -E /private/var/log/apache2/service_proxy_error.log
70 582 574 0 Wed07PM ?? 0:00.11 /usr/sbin/httpd -D FOREGROUND -f /Library/Server/Web/Config/Proxy/apache_serviceproxy.conf -E /private/var/log/apache2/service_proxy_error.log
70 583 574 0 Wed07PM ?? 0:00.01 /usr/sbin/httpd -D FOREGROUND -f /Library/Server/Web/Config/Proxy/apache_serviceproxy.conf -E /private/var/log/apache2/service_proxy_error.log
70 584 574 0 Wed07PM ?? 0:00.02 /usr/sbin/httpd -D FOREGROUND -f /Library/Server/Web/Config/Proxy/apache_serviceproxy.conf -E /private/var/log/apache2/service_proxy_error.log
70 585 574 0 Wed07PM ?? 0:00.02 /usr/sbin/httpd -D FOREGROUND -f /Library/Server/Web/Config/Proxy/apache_serviceproxy.conf -E /private/var/log/apache2/service_proxy_error.log
70 586 574 0 Wed07PM ?? 0:00.02 /usr/sbin/httpd -D FOREGROUND -f /Library/Server/Web/Config/Proxy/apache_serviceproxy.conf -E /private/var/log/apache2/service_proxy_error.log
70 8282 574 0 7:09PM ?? 0:00.01 /usr/sbin/httpd -D FOREGROUND -f /Library/Server/Web/Config/Proxy/apache_serviceproxy.conf -E /private/var/log/apache2/service_proxy_error.log
70 8296 574 0 7:10PM ?? 0:00.01 /usr/sbin/httpd -D FOREGROUND -f /Library/Server/Web/Config/Proxy/apache_serviceproxy.conf -E /private/var/log/apache2/service_proxy_error.log
70 8297 574 0 7:10PM ?? 0:00.02 /usr/sbin/httpd -D FOREGROUND -f /Library/Server/Web/Config/Proxy/apache_serviceproxy.conf -E /private/var/log/apache2/service_proxy_error.log
70 8298 574 0 7:10PM ?? 0:00.01 /usr/sbin/httpd -D FOREGROUND -f /Library/Server/Web/Config/Proxy/apache_serviceproxy.conf -E /private/var/log/apache2/service_proxy_error.log
501 36371 8333 0 7:32PM ttys001 0:00.00 grep httpd
max:ssl maxnelson$ sudo apachectl -k restart
httpd not running, trying to start
(48)Address already in use: AH00072: make_sock: could not bind to address [::]:80
(48)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
AH00015: Unable to open logs
max:ssl maxnelson$ tail -f /private/var/log/apache2/service_proxy_error.log
[Thu Jul 06 19:33:48.002767 2017] [proxy:error] [pid 582] (61)Connection refused: AH00957: HTTP: attempt to connect to 127.0.0.1:34580 (127.0.0.1) failed
[Thu Jul 06 19:33:48.002903 2017] [proxy_http:error] [pid 582] [client ::1:57056] AH01114: HTTP: failed to make connection to backend: 127.0.0.1, referer: http://localhost/
[Thu Jul 06 19:33:58.266146 2017] [proxy:error] [pid 585] (61)Connection refused: AH00957: HTTP: attempt to connect to 127.0.0.1:34580 (127.0.0.1) failed
[Thu Jul 06 19:33:58.266260 2017] [proxy_http:error] [pid 585] [client ::1:57060] AH01114: HTTP: failed to make connection to backend: 127.0.0.1
[Thu Jul 06 19:33:58.469431 2017] [proxy:error] [pid 584] (61)Connection refused: AH00957: HTTP: attempt to connect to 127.0.0.1:34580 (127.0.0.1) failed
[Thu Jul 06 19:33:58.469554 2017] [proxy_http:error] [pid 584] [client ::1:57061] AH01114: HTTP: failed to make connection to backend: 127.0.0.1, referer: http://localhost/d3-timeline-master/example
[Thu Jul 06 19:34:01.239357 2017] [proxy:error] [pid 8296] (61)Connection refused: AH00957: HTTP: attempt to connect to 127.0.0.1:34580 (127.0.0.1) failed
[Thu Jul 06 19:34:01.239655 2017] [proxy_http:error] [pid 8296] [client ::1:57062] AH01114: HTTP: failed to make connection to backend: 127.0.0.1, referer: http://localhost/
[Thu Jul 06 19:34:21.082799 2017] [reqtimeout:info] [pid 8297] [client ::1:57066] AH01382: Request header read timeout
[Thu Jul 06 19:34:21.082797 2017] [reqtimeout:info] [pid 586] [client ::1:57065] AH01382: Request header read timeout
[Thu Jul 06 19:38:38.439198 2017] [proxy:error] [pid 583] (61)Connection refused: AH00957: HTTP: attempt to connect to 127.0.0.1:34580 (127.0.0.1) failed
[Thu Jul 06 19:38:38.439354 2017] [proxy_http:error] [pid 583] [client ::1:57179] AH01114: HTTP: failed to make connection to backend: 127.0.0.1
[Thu Jul 06 19:38:39.539888 2017] [proxy:error] [pid 8298] (61)Connection refused: AH00957: HTTP: attempt to connect to 127.0.0.1:34580 (127.0.0.1) failed
[Thu Jul 06 19:38:39.540047 2017] [proxy_http:error] [pid 8298] [client ::1:57180] AH01114: HTTP: failed to make connection to backend: 127.0.0.1, referer: http://localhost/d3-timeline-master/example
很高兴提供更多信息,我已经尝试关注每篇文章并尽我所能在网上找到但没有成功。也许值得一提的是,我最近生成了一个新的自签名证书,但不确定这是否也会影响事情。非常感谢任何帮助。
应OP的要求,我把我的评论变成了答案。
你可能有其他进程监听80端口,用命令netstat -an | grep LISTEN