Livecode Server + OS X Server

Livecode Server + OS X Server

Things are a bit different in standard OS X for web hosting (Apache is still there but you need to re-enable things). After giving it some thought I decided to plunk down $19.95 to get a nice gui and some extra features for my dev laptop. I mostly use LAMP in production, but I like my Mac to build from so it didn’t seem too pricey to kick the tires. Just turn off the built in Apache if you are running it before you get started. Maybe the server install handles that but I didn’t wait to find out.

[To run OS X Server 5.1.x you’ll need to update your OS X software to at least 10.11.x (El Capitan). ]

That being said, the documents for how to set up livecode server for OS X on the Livecode site are a bit dated and if you want to avoid hair-pulling this might help you out.

Open up your server app and select the Websites icon in the left hand pane.

We are going to configure the main site for this example. Select the pencil (edit) icon.

We need to make two edits. First we’ll add a definition for a “dot lc” index:

Once that’s done you can create an index.lc file for the same reason you might want to use an index.php file (so you can pre-process and otherwise amaze your friends).

Secondly we will need to enable cgi execution. This can all be done manually by editing the Apache config file, but why not just click a button while you are here?

This is a dev system so I pretty much enable any and everything.

Now comes the fun part. You will need an editor (vi, etc) but since we are using a Mac here, I’ll use bbedit. It makes it easy for me to edit docs that are wheel owned but that I still need to make changes to without too much hassle.

The location for the web server and the config files are different with server 5.x than in the old user level Apache. Here are a couple of screenshots to get you to the right place-

The one with the line through it is not the webserver you are looking for (assuming you installed OS X Server 5.1.x which is sort of the point of this exercise)

Select Server and then select the Web folder and locate the right configuration file to edit. There are several so be careful at this point.

You want the file named httpd_server_app.conf

First let’s look at the default cgi alias for OS X

Leave this alone, just note that the “standard” directory for your cgi executables on OS X is named “CGI-Executables” not cgi-bin. There are historical reasons for this, but it is mildly amusing that the company known for making things simpler took this approach…

Now scroll down to line 417 or so-

See how Apple has enabled python and ruby by default but left livecode out? Let’s fix that by adding a comment and two lines right underneath our script neighbors:


Save your file (you’ll have to authenticate with your admin password) and Apache is now configured. Just to be complete, let’s also look at where you put your livecode server binaries and libraries.

Speaking of which, here’s another thing that I found kind of funny. Remember how the default directory “CGI-Executables?” was aliased to cgi-bin? Well, when I installed server 5.1.x that directory wasn’t in the Data folder. Okay, I created one. If you don’t have one just do the same so your structure looks like this-

Finally, install (which means drag and drop on Mac) your livecode server and the folders that come with it into your CGI-Executables folder. (chmod 755 as needed)

That’s it. You are ready for your hello world test. Livecode server is a very capable server and is much more than a simple cgi. You can process image files, send mail, build games, run complex simulations and address IoT devices- or just entertain yourself by writing a simple chatbot to remind you where the CGI-Executables folder is.

Lastly, configuring Apache is near religious by nature. I apologize in advance to any who find these simple hacks unappealing. Feel free to make it better (but not longer, please).


To view or add a comment, sign in

More articles by Mark Clark

  • A silent field of vectors, waiting for a disturbance

    My daughter and I were sending back and forth emails this morning. The conversation dovetailed after I sent her some…

    4 Comments
  • Free and Effortless File Sharing

    Ad Hoc Drag and Drop File Sharing Using Minio and AppleScript I’m a lazy person. If I can do something in one or two…

    1 Comment
  • System Design for Storage Startups

    So you've just created the world's greatest storage product. This thing will practically sell itself because it is so…

    3 Comments
  • Mirror Mirror: File to Cloud in 25 lines

    If you are interested in app development for the cloud then Minio Server is a great choice for storing your data. If…

    4 Comments

Others also viewed

Explore content categories