FileMaker Server 19: Configure Apache User Directories on Mac OSX

The Problem

I cannot use the Sites directory in my user account for web development

Diagnosis

User accounts haven’t been configured in Apache.

User Hosting

The default Apache config for FileMaker Server are conservative. This is a good thing in general. If you want to use your Sites folder in your account as a location for web dev then you need to modify httpd.conf to allow that.

FileMaker Server controls the Apache instance on MacOSX and it uses configuration files stored in /Library/FileMaker\ Server/HTTPServer/conf/.

Open httpd.conf and uncomment the Include command for user home directories.

 427 # User home directories
 428 Include conf/extra/httpd-userdir.conf
 429

In addition you need to create a new directory to store config files for users and add a .conf file for each account that you want to allow to run a web site.

Run these instructions from the command line

cd /Library/FileMaker Server/HTTPServer/conf
sudo mkdir users
sudo chmod fmserver:fmsadmin users
cd users
vi malcolm.conf

Note: Give the config files the same name as your user accounts. In this case the user account name is malcolm.

Now insert the directives that you want. This is enough to get started

1 <Directory "/Users/malcolm/Sites/">
2 AllowOverride All
3 Options Indexes Multiviews FollowSymLinks
4 Require all granted
5 </Directory>

Save and exit.

Change permissions on your files to make fmserver the owner and fmsadmin the group.

sudo chmod fmserver:fmsadmin *.conf

Restart Apache

FileMaker Server provides a batch script to control Apache. It takes exactly the same commands as apachectl.

cd /Library/FileMaker\ Server/HTTPServer/bin
sudo ./httpdctl graceful

Give Apache a minute to reboot.

You’ll now be able to do your web development in your Sites directory.

Troubleshooting

Each version of FileMaker Server ships with a different config for Apache. Earlier versions did not include the user directories module. All that is required to manage this problem is to add this to call the module.

LoadModule userdir_module /usr/libexec/apache2/mod_userdir.so

Place this line in the same place as the other calls to LoadModule so that they are all in the same place.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.