From: Loren C. <lor...@gm...> - 2012-08-21 16:40:26
|
Hello folks, With the upgrade to Mountain Lion, the Apache server is no longer included. Apache is part of the Server app that is separate. I was looking for a way to incorporate eXist with the Mac OS X Server configuration base, so that the proxies can be turned on and off from the Server tools. Adding the following as org.exist-db.plist to /Library/Server/Web/Config/apache2/webapps adds eXist Open Source XML Database to the web app list and performs a proxy to eXist. <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <!-- See man pages for webapp.plist(5) and webappctl(8) for information about this example webapp.plist --> <plist version="1.0"> <dict> <key>includeFiles</key> <array/> <key>launchKeys</key> <array/> <key>name</key> <string>org.exist-db</string> <key>displayName</key> <!-- Name shown in Server app --> <string>eXist Open Source XML Database</string> <key>proxies</key> <!-- ProxyPass/ProxyPassReverse directives are activated when webapp is started --> <dict> <key>/exist</key> <!-- Sets up a reverse proxy --> <dict> <key>keysAndValues</key> <string/> <key>path</key> <string>/exist</string> <key>urls</key> <!-- URLs comprise a proxy_balancer group --> <array> <string>http://localhost:8080/exist</string> </array> </dict> </dict> <key>requiredModuleNames</key> <array> <!-- Apache plugin modules are enabled when webapp is started --> <string>proxy_module</string> </array> <key>requiredWebAppNames</key> <array> <!-- Required web apps are started when this webapp is started --> </array> <key>startCommand</key> <string>/Users/cahlander/eXist-trunk/tools/wrapper/bin/exist.sh start</string> <key>stopCommand</key> <string>/Users/cahlander/eXist-trunk/tools/wrapper/bin/exist.sh stop</string> <key>installationIndicatorFilePath</key> <!-- The presence of this file indicates web app is installed --> <string>/Users/cahlander/eXist-trunk/VERSION.txt</string> <key>sslPolicy</key> <!-- Determines webapp SSL behavior --> <integer>0</integer> <!-- 0: default, UseSSLWhenEnabled --> <!-- 1: UseSSLAlways --> <!-- 2: UseSSLOnlyWhenCertificateIsTrustable --> <!-- 3: UseSSLNever --> <!-- 4: UseSSLAndNonSSL --> </dict> </plist> It starts, but does not stop. The entry does show in the advanced settings. It does not stop from the GUI. The following command-line entries will work, but I did get a corruption after I stopped and restarted. sudo webappctl start org.exist-db sudo webappctl stop org.exist-db https://developer.apple.com/library/mac/#documentation/Darwin/Reference/Manpages/man8/webappctl.8.html#//apple_ref/doc/man/8/webappctl https://developer.apple.com/library/mac/#documentation/Darwin/Reference/Manpages/man8/webapp.plist.8.html#//apple_ref/doc/man/8/webapp.plist Can you take a look at my solution and make any suggestions to improve it? I would love to add this capability with the other Mac enhancement that was created. |