0

Background

I recently upgraded to macOS Sierra, but couldn't see the typical "it works" page on the local host.

I followed some instructions online, first I did the following to my httpd.conf file:

  1. Uncommenting from /etc/apache2/httpd.conf

    LoadModule userdir_module libexec/apache2/mod_userdir.so
    LoadModule vhost_alias_module libexec/apache2/mod_vhost_alias.so
    Include /private/etc/apache2/extra/httpd-vhosts.conf
    Include /private/etc/apache2/extra/httpd-userdir.conf
    
  2. Uncomment from /etc/apache2/extra/httpd-userdir.conf

    Include /private/etc/apache2/users/*.conf
    
  3. In my /etc/apache2/users/$USERNAME.conf file I had ProxyPass configured as well, and to get it working again I had to re-uncomment the following from my httpd.conf.

    LoadModule proxy_module libexec/apache2/mod_proxy.so
    LoadModule proxy_http_module libexec/apache2/mod_proxy_http.so
    

the instructions gave me a 403 error on localhost instead of page not found error.

with more search finally these instructions did it:

sudo mv httpd.conf httpd.conf.sierra
sudo mv httpd.conf~previous httpd.conf
sudo apachectl restart

Problem

Things went fine for half a day but the next time I turned on my mac I got this error: ping works and git pull etc work. But I cannot visit websites on chrome/safari etc. I rebooted my mac on recovery mode and the internet worked fine on chrome so I know it's not a hardware issue or an ISP issue.

Here is the output of ifconfig -a

lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
    options=1203<RXCSUM,TXCSUM,TXSTATUS,SW_TIMESTAMP>
    inet 127.0.0.1 netmask 0xff000000 
    inet6 ::1 prefixlen 128 
    inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1 
    nd6 options=201<PERFORMNUD,DAD>
gif0: flags=8010<POINTOPOINT,MULTICAST> mtu 1280
stf0: flags=0<> mtu 1280
en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
    ether c4:b3:01:d4:dc:d7 
    inet6 fe80::1c4b:b2f5:b346:e9cf%en0 prefixlen 64 secured scopeid 0x4 
    inet 192.168.43.145 netmask 0xffffff00 broadcast 192.168.43.255
    nd6 options=201<PERFORMNUD,DAD>
    media: autoselect
    status: active
en1: flags=963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX> mtu 1500
    options=60<TSO4,TSO6>
    ether 6a:00:02:b2:2f:40 
    media: autoselect <full-duplex>
    status: inactive
en2: flags=963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX> mtu 1500
    options=60<TSO4,TSO6>
    ether 6a:00:02:b2:2f:41 
    media: autoselect <full-duplex>
    status: inactive
bridge0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
    options=63<RXCSUM,TXCSUM,TSO4,TSO6>
    ether 6a:00:02:b2:2f:40 
    Configuration:
        id 0:0:0:0:0:0 priority 0 hellotime 0 fwddelay 0
        maxage 0 holdcnt 0 proto stp maxaddr 100 timeout 1200
        root id 0:0:0:0:0:0 priority 0 ifcost 0 port 0
        ipfilter disabled flags 0x2
    member: en1 flags=3<LEARNING,DISCOVER>
            ifmaxaddr 0 port 5 priority 0 path cost 0
    member: en2 flags=3<LEARNING,DISCOVER>
            ifmaxaddr 0 port 6 priority 0 path cost 0
    nd6 options=201<PERFORMNUD,DAD>
    media: <unknown type>
    status: inactive
p2p0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 2304
    ether 06:b3:01:d4:dc:d7 
    media: autoselect
    status: inactive
awdl0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1484
    ether 3e:43:f9:8e:ae:0d 
    inet6 fe80::3c43:f9ff:fe8e:ae0d%awdl0 prefixlen 64 scopeid 0x9 
    nd6 options=201<PERFORMNUD,DAD>
    media: autoselect
    status: active
utun0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 2000
    inet6 fe80::f765:ed4f:b226:f379%utun0 prefixlen 64 scopeid 0xa 
    nd6 options=201<PERFORMNUD,DAD>

What i have tried

loading chrome shows me this error. enter image description here

initially both the web proxy (http) and secure web proxy (https) were selected.. deselecting them didn't change much enter image description here

  • Can you ping IP's and domains? – b4d Jan 16 '17 at 6:01
  • yes ping works fine and internet works perfectly fine on recovery mode as well – abbood Jan 16 '17 at 6:03
  • my problem seems similar to this one: apple.stackexchange.com/questions/177873/… – abbood Jan 16 '17 at 6:37
  • Instead of updating your question with the answer, you should write the update as an answer in and of itself. This way, the question can be marked "answered." – Allan Jan 16 '17 at 12:47
1

it works fine now! but the worst part is that I'm not sure why or what fixed it. For reference here is the last two things i did:

  1. I deselected whatever was selected under the proxies tab in network settings
  2. I replaced the contents of my /etc/apache2/httpd.conf with /etc/apache2/httpd.conf.sierra, which for reference can be found here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .