1 Reply Latest reply: Sep 15, 2013 4:33 AM by dodonian
dodonian Level 1 Level 1 (0 points)

Hi,

 

I'm wondering if you could help me, as this issue drives me nuts.

 

Facts:

 

  1. Mountain Lion Mini server out of the box.
  2. Never manually configured Apache.
  3. Only SSL port changed from 22 to 443 for obvious reasons.

 

Whenever I activate the Websites, the status is reported as RUNNING (both webstate and Apache), but http://locahost fails.

 

The only way to start the localhost service is by : sudo bash -x /usr/bin/apachectl -k start

 

This brings live Apache on /Library/Webservice/Documents, not on the foreseen default directory at /Library/Server/Web etc,

I just cannot believe that Apple messed such a simple (?) thing. The server runs all updates and is used in a rather conservative way.

 

Any help will be highly appreciated.

 

D.

  • 1. Re: Websites (Mountain Lion Server) not working
    dodonian Level 1 Level 1 (0 points)

    Well,

     

    Solution found. My apologies to Apple. The problem of failing httpd was due to the fact that I had changed the SSH default port from 22 to 443. This was not done in a brutal way, but as recommended in the relevant posts that can be easily googled (New .plist file, new service in /etc/services launchctl load etc).

     

    The fact that SSH was listening to the 443 port caused apparently a conflict with Apple's server httpd implementation.

    There is a router in between that can forward ports. This router was re-programmed to forward port 443 from the internet to port 22. After a few restarts the SSH and Websites seem to function flawlessly.

     

    Just for info, this is our second router used mostly for testing and back office development. Our productive router is directly connected to the internet, running firewall etc.

     

    My advice is the following: Apple servers work! Just install a router that does the correct port forwarding according to your needs and leave the server alone, as designed by Apple.

     

    Thanks for viewing the issue so far.

     

    D.

     

    P.S. The SSH port conflict with SSL was suspected from the beginning. It's because apache ctl -k start worked (in the wrong directory) that made things complex.