2

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

8
  • 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.
    – dan
    Aug 22, 2013 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. Aug 25, 2013 at 21:58
  • I'll also point out that I'm not trying to connect using a FQDN. Aug 25, 2013 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?
    – dan
    Aug 26, 2013 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...!? Aug 27, 2013 at 23:36

1 Answer 1

1

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).

You must log in to answer this question.

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