title: Cannot connect to apache server locally
body: <p>I am trying to access an Apache server on my local machine, but can't get it to work. I had it working last week, but then it randomly stopped working. I have edited the httpd.conf file to update the port to 9876. I also added the ExecCGI directive in the HTDocs directory.</p>
  
  <p>I usually see the index.html page I created by visiting localhost:9876, but now I just see an erroneous page. When I just run localhost:80, I see the it works page! How is something still showing up on port 80 when I clearly changed it to another port? I read more about this and found out it has to do with the sharing settings on OSX. These settings were never enabled to begin with. Why am I still seeing a page on port 80, and why is the designated port I chose not showing any content?</p>
  
  <p>Things I have done:</p>
  
  <ol>
  <li>I have tried stopping and restarting the server multiple times(with
  sudo)</li>
  <li>I use the web browser or netcat to connect to apache, but I get no response.</li>
  </ol>
  
  <p>I ran lsof -i4TCP:9876 and get the following output:</p>
  
  <pre><code>launchd      1           root   25u  IPv6 0xee69429dde6f1b6f      0t0    TCP localhost:ipp (LISTEN)
  launchd      1           root   26u  IPv4 0xee69429dde6f2b77      0t0    TCP localhost:ipp (LISTEN)
  LogMeIn     82           root    5u  IPv4 0xee69429dde6f238f      0t0    TCP *:globe (LISTEN)
  vpnagentd   83           root    6u  IPv4 0xee69429de115bb77      0t0    TCP localhost:29754 (LISTEN)
  GitHub     201  kamranpirwani    6u  IPv4 0xee69429de35f4b77      0t0    TCP localhost:25035 (LISTEN)
  GitHub     201  kamranpirwani    7u  IPv6 0xee69429dde6f0eaf      0t0    TCP localhost:25035 (LISTEN)
  mysqld     412         _mysql   14u  IPv6 0xee69429dde6efdaf      0t0    TCP *:mysql (LISTEN)
  Coda\x202  726  kamranpirwani    5u  IPv4 0xee69429deb25fb77      0t0    TCP *:6942 (LISTEN)
  Coda\x202  726  kamranpirwani    7u  IPv6 0xee69429dde6f12ef      0t0    TCP *:6942 (LISTEN)
  Coda\x202  726  kamranpirwani   10u  IPv4 0xee69429deb47438f      0t0    TCP *:50490 (LISTEN)
  Coda\x202  726  kamranpirwani   11u  IPv6 0xee69429dde6f062f      0t0    TCP *:50490 (LISTEN)
  Coda\x202  726  kamranpirwani   12u  IPv4 0xee69429dea898b77      0t0    TCP *:50491 (LISTEN)
  Coda\x202  726  kamranpirwani   13u  IPv6 0xee69429dde6ef96f      0t0    TCP *:50491 (LISTEN)
  httpd     1879           root    5u  IPv6 0xee69429dde6f172f      0t0    TCP *:http (LISTEN)
  httpd     1880           _www    5u  IPv6 0xee69429dde6f172f      0t0    TCP *:http (LISTEN)
  httpd     1920           _www    5u  IPv6 0xee69429dde6f172f      0t0    TCP *:http (LISTEN)
  </code></pre>
  
  <p>This leads me to believe the my apache web server is listening for requests on this port. Why can't the browser or netcat connect to it?</p>
  
  <p>Edit:</p>
  
  <p>Log file(with personal email removed) <a href="http://pastebin.com/84RcB2Er" rel="nofollow">http://pastebin.com/84RcB2Er</a></p>