Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

After updating to 10.8.4 I am having trouble running my macports apache server. I stop the built-in apache with: sudo apachectl stop, then I try to start macports apache with: sudo /opt/local/apache2/bin/apachectl -k start and I get:

httpd: Could not reliably determine the server's fully qualified domain name, using My-Name-iMac.local for ServerName
httpd (pid 98) already running

and when I load localhost in the browser I get Unable to Connect...

I'm just running this as a development machine, so I don't need a domain name. The output of hostname (before and after this) is My-Name-iMac.local as you'd expect. What concerns me is the httpd (pid 98) already running part of this output.

which apachectl outputs /usr/sbin/apachectl

share|improve this question
I think you should find a way to fix the output of hostname so as to get your real FQDN. I'm convinced this is neither a Macports nor an Apache problem. – daniel Azuelos Aug 22 '13 at 6:47
I'm using this as a development environment. I've never used FQDNs on development environments before and its never been a problem. I didn't have one before the upgrade either. Apple changed the way "web sharing" works in 10.8, and this is the source of the problem I think. – iPadDeveloper2011 Aug 25 '13 at 21:58
I'll also point out that I'm not trying to connect using a FQDN. – iPadDeveloper2011 Aug 25 '13 at 22:06
→ iPadDeveloper2011: clear. You should add this information about a local dev. environnement within your original question: so as to avoid irrelevant suggestions as mine ☺ (most HTTP servers have to be connected to the Internet). Is ping My-Name-iMac.local OK? Could you add the opuput of hostname within your original question? – daniel Azuelos Aug 26 '13 at 8:28
Hi @daniel. Updated question as you suggest. Yes, ping My-Name-iMac.local seems to be OK. Interesting this is that it still works no problem after sudo apachectl stop...!? – iPadDeveloper2011 Aug 27 '13 at 23:36

This problem seemed to slowly evaporate when I started using sudo apachectl -k stop (though this could be just coincidence). It now seems I can switch between servers using

sudo apachectl stop and /opt/local/apache2/bin/apachectl start,

and then back with

/opt/local/apache2/bin/apachectl stop and sudo apachectl start

no problem. I haven't been able to find any documentation on apachectl -k (beyond apachectl help).

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.