views:

56

answers:

1

I am running Mac 10.4 and have been using MAMP PRO to host several websites I manage. Now that I have installed FileMaker Pro Server, it forces me to turn Web Sharing on in System Preference. So is it possible to either replace Apache with MAMP PRO's version? Or is it possible to get FileMaker Pro to use MAMP instead of Web Sharing? If so, how can I make it happen?

Also, with FileMaker Instant Web Publishing, how , how can I make my domain link directly to where FileMaker publishes it? So what I want to be able to do is type http:///mydomain.com and it direct to mydomain.com:591/FMI/IWP/

+2  A: 

You can modify the system launchd.plist that's bound to this so it launches your custom apache install.

You do this by editing the:

/System/Library/LaunchDaemons/org.apache.httpd.plist

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"&gt;
<plist version="1.0">
<dict>
    <key>Disabled</key>
    <true/>
    <key>Label</key>
    <string>org.apache.httpd</string>
    <key>ProgramArguments</key>
    <array>
        <string>/usr/sbin/httpd</string>
        <string>-D</string>
        <string>FOREGROUND</string>
    </array>
    <key>OnDemand</key>
    <false/>
    <key>SHAuthorizationRight</key>
    <string>system.preferences</string>
</dict>
</plist>

Change the /usr/sbin/httpd string to the path to your custom apache install. Make sure you disable Web Sharing first or from the command line:

launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist

After you edit it, either click the web sharing button or from the command line:

launchctl load -w /System/Library/LaunchDaemons/org.apache.httpd.plist

For the second question, you can set a redirect in your apache config

/path/to/apache2/conf/httpd.conf

Not exactly sure where this is for MAMP, the general syntax is:

Redirect / http://mydomain.com:591/FMI/IWP/

It's usually good practice to wrap these in conditionals

<IfModule alias_module>
    Redirect / http://mydomain.com:591/FMI/IWP/
</IfModule>

And I think it'd be a more elegant solution to proxy pass the requests

</IfModule>
<IfModule proxy_module>
  ProxyRequests Off
  <Proxy *>
    Order deny,allow
    Deny from all
    Allow from localhost
  </Proxy>
  <Location /filemaker/>
    ProxyPass /filemaker/ http://www.google.com/
    ProxyPassReverse /filemaker/ http://www.google.com/
    ProxyPass /images http://www.google.com/images
    ProxyPass /extern_js http://www.google.com/extern_js
    ProxyPass /intl http://www.google.com/intl
    ProxyPass /csi http://www.google.com/csi
  </Location>
</IfModule>

In this example, I'd just have to go to http://localhost/filemaker and it shows the google page. What resources you pass in the ProxyPass depends on what filemaker needs.

If you don't care about retaining your domain and you want everything to proxy, you'd

</IfModule>
<IfModule proxy_module>
  ProxyRequests Off
  <Proxy *>
    Order deny,allow
    Deny from all
    Allow from localhost
  </Proxy>
    ProxyPass / http://www.google.com/
    ProxyPassReverse / http://www.google.com/
</IfModule>
jkyle
Why not just disable Apple's launchd.plist and make your own. If apple updates their plist via a Software Update, they will overwrite your customizations and that will cause much confusion and grief!
tegbains