當我的MacBook Pro mid2009更新到MacOS X El Capitan後,我發現許多事情不再像以前那樣工作了。 內置的apache2在http://127.0.0.1上不是很流行,但在http://localhost上很流行。在優勝美地,他們倆都正常工作。無法訪問127.0.0.1 apache 2(MacOS X)
/private/etc/hosts
看起來像這樣:
##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
##
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost
這看起來很奇怪的Cuz 127.0.0.1和本地主機是相同的東西。 任何想法發生了什麼?
的httpd.conf
#
# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, instead of the default. See also the <VirtualHost>
# directive.
#
# Change this to Listen on specific IP addresses as shown below to
# prevent Apache from glomming onto all bound IP addresses.
#
#Listen 12.34.56.78:80
Listen 80
看起來'httpd'綁定到':: 1'和_not_'127.0.0.1'。當您使用_localhost_時,您通過IPv6地址連接,請編輯您的問題以添加您的apache配置,以及任何可能在靜態/綁定中生成的錯誤日誌輸出。 –
已添加httpd.conf。 –