Until I recently switched to I had been using to provide a local server environment on my Mac. A small but none the less important feature of MAMP is an option to have the Apache and MySQL servers started when you open the application. So, by checking this option and including MAMP as a Login Item my MAMP servers were up-and-running when I logged in. Unfortunately, XAMPP has no such option. Including XAMPP as a Login Item merely opens the XAMPP Control.app and I have to start the servers manually.
![]() ![]()
XAMPP Installation and Virtual Host Configuration in MAC OS - Duration: 13:42. Anish Mandal 39,070 views. I installed the XAMPP and started all servers. And everything worked fine. Then I changed the Index. Kushals-MBP proftpd26091: error: no valid servers configured. June 2019 13:12. Mine is a Mac though.
An extra step I’d rather not have to do.So, how can I have my XAMPP servers running whenever I login? The answer, by using a daemon.1. DaemonsDaemons in OS X are system-wide services that are launched at system start-up.
They are managed by a program named launchd which was first introduced in OS X 10.4 Tiger. Services that are run on a per-user basis are known as agents, but are still managed by launchd. From a user’s perspective, launchd replaces the more traditional cron.To have launchd start XAMPP’s Apache server as a service we need to create a launchd configuration file. This configuration file has a.plist extension, a format familiar to many OS X users. Launchd configuration files can be placed in one of three folders determining when and for whom the service will start. System startup all users: /Library/LaunchDaemons/.
User login all users: /Library/LaunchAgents/. User login this user only: /Library/LaunchAgents/2. What You’ll NeedAny text editor will allow you to create the necessary configuration file, but you’ll be asked to authenticate if saving the file in either the /Library/LaunchDaemons/ or /Library/LaunchAgents/ folders. You can use a text editor like by Peter Borg which will allow you to authenticate.
I’m sure there are others. There’s also a great little app called, coincidentally by the same author, which makes the whole configuration a snap. Whilst both Smultron and Lingon are free they’re unfortunately no longer being developed.
However, the latest (last?) versions of both run fine under OS X 10.5.8 Leopard 0S X 10.6.2 Snow Leopard.3. Creating the launchd Configuration FileThe configuration file I’m going to create will start XAMPP’s Apache server as a service at system startup. In Terminal I’d type /Applications/XAMPP/xamppfiles/xampp startapache to start XAMPP’s Apache server, so this is the command I’ll include in my configuration file.
![]()
There are other options available, but I’m only concerned with starting Apache. A full list of parameters can be found.If you’re using the standard Apache port 80 in XAMPP or any non-standard port below 1024 then you’ll need to place the configuration file in the /Library/LaunchDaemons/ folder. This is because XAMPP requires authentication to use ports below 1024 and a configuration file in the /Library/LaunchDaemons/ folder will run as root.
If you place the configuration file in either of the other two folders it won’t be able to authenticate and the Apache server won’t start.To start creating the configuration file, open Lingon and click the New button at the top-left corner. Launch daemon configuration in LingonTo configure the LaunchDaemon we need to do just 4 things:. 1. Ensure the Enabled option is checked. If later you wish to disable the LaunchDaemon simply uncheck this option. 2.
Enter a name for the configuration. I’ve called mine apachefriends.xampp.apache.start.
Lingon will add the.plist extension for you. 3. Enter the command, as you would in Terminal, to start Apache. This is /Applications/XAMPP/xamppfiles/xampp startapache. 4. We’re only concerned with the Run it when it is loaded by the system (at startup or login).
All other options should remain unchecked.That’s it. Save the file and you’re done. Whenever you reboot your Mac, XAMPP’s Apache server will be up-and-runing when you log-in. If you navigate to the /Library/LaunchDaemons/ folder you’ll now see the apachefriends.xampp.apache.start.plist file.At the bottom right-hand corner of the Lingon window there’s an Expert Mode button.
If you click this button you’ll see the configuration file that Lingon’s created. It should resemble this. Code
Hi Alister,I’m using 10.6.2 and XAMPP 1.7.2a which appears to be the latest version released this August.Have you tried starting Apache from Terminal by typing sudo /Applications/XAMPP/xamppfiles/xampp startapache?Terminal should respond with something like XAMPP: Starting Apacheok.If not, take a look at the Apache error log in /Applications/xampp/xamppfiles/logs/errorlog for any clues.I’m going to run through my instructions again, but your issue may be due to the version of XAMPP you’re using.Let me know how you get on.
![]() Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
January 2023
Categories |