12 Replies Latest reply on Feb 2, 2014 7:25 PM by Malcolm

    FMS 13 and Apache on OS X Mavericks

    fmdataweb

      I've recently installed a new FileMaker Server v13 which I use for Custom Web Publishing with PHP. I've been using CWP and the FileMaker PHP API since v9, and I'm now becoming familiar with the changes with Server v13 which installs it's own "instance" of the Apache web server.

       

      I'm used to working with Apache in terminal and also viewing the Apache logs in the Console app and now adjusting to the changes in Server 13 but have a few questions which I can't find answers to in the FileMaker Server help:

       

      1. if I use the Apache commands in Terminal, e.g. "apachectl -v" returns "Apache/2.2.24 (Unix)". Is this the version of Apache that ships with OS X 10.9/Mavericks or the FileMaker "instance"? I presume it's the FileMaker Server "instance" but wan't to confirm.

       

      2. does the FileMaker instance of Apache automatically open on the Mac OS startup?

       

      3. the FileMaker instance of the Apache log files can be found in /Library/FileMaker Server/HTTPServer/logs/. I'm used to viewing these in the Console.app but the FileMaker Apache logs appear to get generated everytime Apache starts, so the access_log might be named someting like "access_log.1390770526". Does anyone know a way to view these in the Console.app automatically without having to add them one by one each time? I'm only interested in viewing the current access_log and error_log.

       

      Thanks,

      Steve

        • 1. Re: FMS 13 and Apache on OS X Mavericks
          Malcolm

          1. FMS doesn't install it's own web server. It simply appropriates the existing one for it own purposes. When you look in the HTTPServer folder inside FileMaker Server you'll see that the script there is simply a wrapper that provides special FMS configs for /usr/sbin/httpd

           

          2. Whenever the machine is rebooted the FMS version is started

           

          3. I've noticed that the logs are time stamped too, annoying isn't it?

           

          4. Have you found a way to include user directories? Uncommenting the instruction in httpd.conf and restarting didn't seem to be sufficient. I can only get 404 errors.

          • 2. Re: FMS 13 and Apache on OS X Mavericks
            lavendt

            Malcolm, you are wrong on this.

            FMS13 do install it's own Apache server instance on Mac.

            That is why you can't use apachectl commands when managing the apache instance, installed by FMS.

            The reason is due to technical requirements for WD.

            That is why you have to either turn off the built-in apache in Mac os x server or digg down into the configurations to change ports from 80 and 443 as they are taken by the FMS installation.

            • 3. Re: FMS 13 and Apache on OS X Mavericks
              PointInSpace

              Actually, FileMaker Server 13 *does* use OS X's built-in Apache build.  It just launches its own instance of it, using its own config file and LaunchDaemon.

               

              You need to use FileMaker Server's specific apachectl binary (at /Library/FileMaker Server/HTTPServer/bin/httpdctl) to start/stop FileMaker's Apache instance to properly address that instance of Apache accordingly.

               

              Why FMI didn't just customize the config file of the regular OS X Apache instance like in previous versions is beyond me, though.  Hopefully this will be changed in the future.

               

              - John

              • 4. Re: FMS 13 and Apache on OS X Mavericks
                taylorsharpe

                Great comment, John May!  I certainly wish they had not made the change to the way Web Direct interacts with Apache. 

                • 5. Re: FMS 13 and Apache on OS X Mavericks
                  Malcolm

                  /Library/FileMaker Server/HTTPServer/bin/httpdctl is a shell script. You can open it with a text editor to see what is happening.

                   

                  What I haven't been able to do is to is to configure the httpd.conf that FMS is using to allow web sharing via user directories on Mac OS X.

                   

                  For my own work I want to have FMSv13 on my development machine and to have access to user sites. In a hosting environment we want to provide user accounts. I know that I can dump everything on my dev machine into the htdocs directory that FMS defines but that doesn't help me with user accounts generally. If anyone finds the key I'd love to know what it is.

                  • 6. Re: FMS 13 and Apache on OS X Mavericks
                    fmdataweb

                    Hi John,

                     

                    I'm not very proficient with Terminal on Mac OS X. In the past I would normally use:

                     

                    sudo apachetctl restart

                     

                    to restart Apache. Do you know the correct command to enter in Terminal to do the same thing with the FileMaker Server installed "instance"?

                     

                    thanks,

                    Steve

                    • 7. Re: FMS 13 and Apache on OS X Mavericks
                      Malcolm

                      Do you know the correct command to enter in Terminal to do the same thing with the FileMaker Server installed "instance”?

                       

                      On Mac OS X

                       

                      sudo /Library/Filemaker\ Server/HTTPServer/httpdctl -graceful

                       

                       

                      Malcolm

                      • 8. Re: FMS 13 and Apache on OS X Mavericks
                        lavendt

                        Hi John

                        Sorry, you are right. Didn't realize that it is actually an instance of the Apache, instead of a seperate installation.

                        Thanks for correcting me...

                        • 9. Re: FMS 13 and Apache on OS X Mavericks
                          lavendt

                          Malcolm;

                          There is a typo in the command you wrote...

                          ..should be: sudo /Library/Filemaker\ Server/HTTPServer/bin/httpdctl -graceful

                           

                          However, I have not been able to make that command work on two different installations. They exit with error 1

                           

                          Another way to stop and start is to use these 2 commands;

                           

                          Stop:

                          sudo launchctl stop com.filemaker.fms

                           

                          Start:

                          sudo launchctl start com.filemaker.fms

                           

                          (be aware that they can take a couple of minutes, though the terminal seems ready immediately)

                          • 10. Re: FMS 13 and Apache on OS X Mavericks
                            LyndsayHowarth

                            Indeed!

                            FMI is forcing us into a 2-machine deployment...even if we have no desire to use WD. This is a pretty impossible situation for development..

                            FMI also limiting our dev version connection to 1 means that testing is a nuisance. We can't hop from IOS to WD without closing the connection first...

                             

                            Sent from my iPad

                            Lyndsay Howarth

                            11th Hour Group Pty Ltd

                            • 11. Re: FMS 13 and Apache on OS X Mavericks
                              Malcolm

                              sorry for the bad information, I was typing from memory. I remember getting an error, perhaps there is no need for the hyphen. If you were in the same directory as the application it would be  ./httpdctl graceful.

                               

                              I did not ever wait for a couple of minutes after supplying commands. If there is such a long lag time it is possible that I need to repeat all my earlier attempts.

                              • 12. Re: FMS 13 and Apache on OS X Mavericks
                                Malcolm

                                It's wild isn't? How many other software companies would think of taking over ports 80 and 443?

                                 

                                I'm still optimistic about finding an appropriate config. I think it is just a matter of asking the right questions.

                                 

                                Malcolm