Domanda

I am trying to utilize the configuration files in Mac OS X Server instead of directly modifying Apache's site file to add a reverse proxy entry for the eXist XML database. The mapping should be from [http://example.com/exist] to [http://localhost:8080/exist].

eXist is up and running.

I have added the following plist file /Library/Server/Web/Config/apache2/webapps/org.exist-db.plist

<?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>
             <!-- Include files are activated in virtual host when webapp is started -->
         </array>
         <key>launchKeys</key>
         <array>
             <!-- Launchd plists in /Applications/Server.app/Contents/ServerRoot/System/Library/LaunchDaemons are loaded when webapp is started -->
         </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>installationIndicatorFilePath</key>
         <!-- The presence of this file indicates web app is installed -->
         <string>/Users/cahlander/eXist-trunk</string>
         <key>sslPolicy</key>
         <!-- Determines webapp SSL behavior -->
         <integer>0</integer>
         <!-- 0: default, UseSSLWhenEnabled -->
         <!-- 1:          UseSSLAlways -->
         <!-- 2:          UseSSLOnlyWhenCertificateIsTrustable -->
         <!-- 3:          UseSSLNever -->
         <!-- 4:          UseSSLAndNonSSL -->
     </dict>
</plist>

running on the local server, going to http://example.com:8080/exist works, but from a different machine, going to http://example.com/exist does not. Also 'eXist Open Source XML Database' should be showing up as web app in the advanced settings. It is not. What am I doing wrong?

È stato utile?

Soluzione

I have fixed all of the outstanding issues, but encountered a new one.

Only add the following as org.exist-db.plist to /Library/Server/Web/Config/apache2/webapps

<?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

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top