- Create
xampp.startapache.plist
in/Library/LaunchDaemons
with the following content :
<?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>Label</key>
<string>org.xampp.server</string>
<key>ProgramArguments</key>
<array>
<string>/Applications/XAMPP/xamppfiles/xampp</string>
<string>startapache</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>AbandonProcessGroup</key>
<true/>
</dict>
</plist>
- Run the following commands
sudo chown root:wheel /Library/LaunchDaemons/xampp.startapache.plist
sudo chmod 644 /Library/LaunchDaemons/xampp.startapache.plist
sudo launchctl load -w /Library/LaunchDaemons/xampp.startapache.plist
XAMPP will automatically start apache on startup, the LaunchDaemon can be modified if needed to start Apache, MySQL, ProFTPd.
Thanks for the script! Works well with apache but mysql won't start. Please, would you post the correct script for mysql?