Mac OSX – Stop OS X apache service and prevent automatic running (OS X SERVER)

I already run MAMP as a local server environment for apache and MySQL, so when I installed Mac OS X Server, which runs it’s own instance of apache, my server encountered problems with MAMP which failed to start.

After some investigation I found the OS X Server instance of Apache started with the system resulting in MAMP failing to start, with no obvious setting to disable the in-built apache services in the OS X Server app settings.

Here’s how to prevent the service starting automatically, then kill the existing service:

Step 1: Locate the following file: /Library/Server/Web/Config/Proxy/apache_serviceproxy.conf

Step 2: Comment out the listening ports in the file

Example using standard ports, change:
Listen 80
Listen 443

To:
# Listen 80
# Listen 443

This prevents apache from starting.

Step 3: Stop inbuilt apache server. Open Terminal, type: sudo killall httpd

Type the following to check http instance have stopped: ps -Al | grep httpd

Inbuilt apache service should now stop and won’t re-start.

Advertisements

Windows – How to free disk space by deleting previous Window(s) installations

Step 1: Click on the Windows search bar or press the start key on your keyboard, type cleanup, then select Disk Cleanup.

Step 2: Click ‘Clean up System file’

Step 3: Scroll to, and select, Previous Windows Installations. Click start to begin the cleanup process which will include the removal of previous Windows installations from your disk.

This freed almost 30Gb on my disk. This, of course, means you’re unable to revert back to your previous Windows installation so proceed with that in mind. I found the disk space more valuable than holding on to the files.