2

A few months ago I setup an Apache server on a Mac Mini running Mac OS 10.14.6. It runs great. Each time I reboot the mac, the Apache service also starts, great.

My question is, why? There is no /Library/LaunchDaemons/org.apache.x file. I can't find anything in the users Library as well. This is a clean install of the OS will nothing much else installed (except things like carbon copy cloner, bbedit, pathfinder, etc).

What am I missing?

Thanks, dave

  • Have you tried checking /Library/LaunchAgents/ and ~/Library/LaunchAgents/? – Hitesh Aug 1 at 15:13
  • Yes. The /Library/LaunchAgents/ only has four files (listed below) and the user home library (~/Library/) doesn't even have a LaunchAgents folder. I must be missing something. – Dave Nasralla Aug 1 at 17:49
  • 1
    There is a difference between /Library/LaunchDaemons/ and /System/Library/LaunchDaemons, which one did you check to see four files? – nohillside Aug 1 at 17:55
  • That's what I was missing. I forget there are three Libraries and not two and just assumed the root Library was the System/Library. Thanks for your help. – Dave Nasralla Aug 1 at 18:18
1

The standard Apache is started through /System/Library/LaunchDaemons/org.apache.httpd.plist:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>Disabled</key>
    <true/>
    <key>Label</key>
    <string>org.apache.httpd</string>
    <key>EnvironmentVariables</key>
    <dict>
        <key>XPC_SERVICES_UNAVAILABLE</key>
        <string>1</string>
        <key>OBJC_DISABLE_INITIALIZE_FORK_SAFETY</key>
        <string>YES</string>
    </dict>
    <key>ProgramArguments</key>
    <array>
        <string>/usr/sbin/httpd-wrapper</string>
        <string>-D</string>
        <string>FOREGROUND</string>
    </array>
    <key>OnDemand</key>
    <false/>
</dict>
</plist>
  • Right. This file does not exist. There are only four files in that folder: com.apple.installer.x, com.barebones.x, com.bombich,x, com.cocoatech.x. The LaunchAgents folder is empty. – Dave Nasralla Aug 1 at 17:46
  • @DaveNasralla You're sure you check the right path? I count >300 files, a lot of them rather essential for basic macOS functionality. – nohillside Aug 1 at 17:51
  • Right. I got /Library confused with /System/Library. I'm good now. – Dave Nasralla Aug 1 at 18:19
  • @DaveNasralla Great, and welcome to AskDifferent. Please check out the faq for details about how the site works, and apple.stackexchange.com/help/someone-answers for what your options are when people answer your posted questions. – nohillside Aug 1 at 18:30

You must log in to answer this question.

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