Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Disable Apache Yosemite Server

Hi,


Is there any way to disable Apache in Yosemite Server?


Have done this in previous version of OSX, but command doesn't run as the location has changed.


Any help would be greatly appreciated.


Thanks

Darren

OS X Yosemite (10.10.5), null

Posted on Sep 29, 2015 3:46 AM

Reply
20 replies

Oct 1, 2015 7:12 AM in response to SquirrelMac

I had a very similar experience.


Under 10.10.4 and Server 4 if i rebooted the box all i had to do was kill Apache by Terminal Command (even with Web Services always off the OSX page overrode CrushFTP). This kept all the Settings functional like Port 443 for CalDav/CardDav while freeing up port 80 which served my CrushFTP Web Interface. Port 21 (without SSL) for FTP clients was also open by default.

Apache killed with

sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist


Now under 10.11. and Server 5 odd things started to happen. After the first boot i noticed my CrushFTP Web Interface on port 80 was up and running. Everything seemed fine and i thought no more Apache Terminal killing (Web Services still off). Shortly after i noticed CalDav/CardDav not updating, in fact there was no communication at all on port 443.


I realized that CrushFTP had an SSL setting activated even if i never used it on port 21. I disabled the optional SSL config and restarted my CrushFTP Server. CalDav/CardDaV started syncing right away BUT also the stupid OSX Server Page came back and was from that moment on absolutely persistent. Terminal command told me Apache unloaded and Web Services still off yet that **** page showed up.


This also locked me out off my CrushFTP Admin Page so i could not even change that port to 8080 as a fallback. 😐


Anyways after a few hours of experimenting and smashing my head on the keyboard i activated Web Services out of curiosity and created a new page on port 80(!). This hilariously broke the proxy which seems to grab all connections now and i was able to reach my CrushFTP Admin Page where i swithced the port from 80 to 8080.


Afterwards i deleted the new useless page in Web Services and modified the Standard OSX Server Page on Port 80 to redirect to my FTP Page on 8080. Not a pretty solution but so far the only way to kind of split services without completely messing everything up.


Weirdly CalDav/CardDav stopped working again but were fixed with a quick On/Off Switch Flip in Server Admin.


Something has clearly changed how connections are handled and sadly not in a good way so far. I hear from messed up Web Settings left and right. 😟

Oct 1, 2015 8:44 AM in response to SquirrelMac

Yeah i tried a ton of other commands to effectively kill the internal OSX Apache but no luck. That page stays there like a rock. Seems certain ports are "reserved" now no matter what. Really unproductive that we are not able to change the OSX Server Page Standard Port.


You could change the Rumpus Port to 8080 and redirect Port 80 there like i did but it is not my favorite solution so far.

Oct 1, 2015 2:09 PM in response to SquirrelMac

Okay, so you probably want to remove OS X Server and revert to OS X (make a complete backup of your environment — first!), so shut off everything and then drag Server.app to the trash, and then empty the trash. That'll be the most supportable means for disabling everything that uses Apache on OS X Server.


Alternatively and as Linc Davis mentions, Rumpus doesn't get you anything you don't already have — FTP is just as much of a massive hassle around modern networks and as wildly insecure and just as good at exposing your login credentials to any local Pineapple Wi-Fi or privileged network position, and that's whether you turn on FTP services in OS X Server or if you use an add-on.

Oct 2, 2015 4:48 AM in response to SquirrelMac

If you are using Server 5.0.4, I agree, Apple's claim to the web ports is a little aggressive. If you are not using Profile Manager and you are not concerned about the web services, you can overcome this by disabling the ports in the service proxy config. You have two options here.


If Apple’s web interface is not needed and you are not using Profile Manager, reclaim those ports by editing the following file:

/Library/Server/Web/Config/Proxy/apache_serviceproxy.conf


Comment or remove the following lines:


listen 80

listen 443


To comment, simply add a # in front of each line. Commenting out the lines is a better plan than deleting. At least if you need to revert, you can simply remove the # character. Reboot the server and now your 3rd party tools have access to the standard web ports.


An alternative option is to multihome the Ethernet connection. This way you can leave the primary interface attached to Apple’s services and run your third party tools on the secondary IP address. If you do this, you will still need to edit the VirtualHost directives in the apache_serviceproxy.conf file. Apple configured the service to listen on all interfaces. You will find the following in the file by default:


<VirtualHost *:80>

<VirtualHost *:443>


Change the * to the primary IP address of your server. This will ensure that Apple’s services only listen on that IP address. For example, let's say your server is currently at address 192.168.0.15. You can give it a second IP address by creating another Ethernet port in System Preferences. In this example, 192.16.0.16. Now the server will respond to both IP addresses. Edit the service proxy file and set the VHost lines to:


<VirtualHost 192.168.0.15:80>

<VirtualHost 192.168.0.15:443>


Once again reboot. When you do, Apple's service proxy will only listen on address 192.168.0.15, allowing ports 80 and 443 to be used on the secondary address 192.168.0.16. Now, you may have some DNS and port forwarding rules to modify but this will allow Apple's services (including Profile Manager) to run without surgery.


Hope this helps.


Reid

Apple Consultants Network

Author "El Capitan Server – Foundation Services" :: Exclusively available in Apple's iBooks Store

Author of Yosemite Server and Mavericks Server books

Disable Apache Yosemite Server

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.