JBoss 7 Mehrere root-Kontext web-Anwendungen

Muss ich konfigurieren Sie zwei websites: www.foo.com und www.bar.net auf meinem Apache2+ JBoss7.- 1-Umfeld.

Apache sites-Konfiguration, Beispiel (Sie sind ähnlich wie jeder andere, außer für den site-Namen) :

<VirtualHost *:80>
        ServerAdmin     [email protected]
        ServerName      www.foo.com

        DocumentRoot /var/www/foo
        <Directory />
                Options FollowSymLinks
                AllowOverride None
        </Directory>
        <Directory /var/www/foo>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride None
                Order allow,deny
                allow from all
        </Directory>

        ScriptAlias /cgi-bin//usr/lib/cgi-bin/
        <Directory "/usr/lib/cgi-bin">
                AllowOverride None
                Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
                Order allow,deny
                Allow from all
        </Directory>

        ErrorLog ${APACHE_LOG_DIR}/error.log
        LogLevel warn
        CustomLog ${APACHE_LOG_DIR}/access.log combined

        SetEnvIf Request_URI "/photos/*" no-jk
        JkMount /ajp13
        JkMount /* ajp13

</VirtualHost>

In JBoss standalone.xml ich habe:

<subsystem xmlns="urn:jboss:domain:web:1.1" default-virtual-server="default-host" native="false">
            <connector name="http" protocol="HTTP/1.1" scheme="http" socket-binding="http"/>
            <connector name="ajp" protocol="AJP/1.3" scheme="http" socket-binding="ajp"/>
            <virtual-server name="default-host" enable-welcome-root="false" default-web-module="bar">
                <alias name="localhost"/>
                <alias name="www.bar.net"/>
            </virtual-server>
            <virtual-server name="foo" enable-welcome-root="false" default-web-module="foo">
                <alias name="www.foo.com"/>
            </virtual-server>
        </subsystem>

Während beide apps haben jboss-web.xml:

<?xml version="1.0" encoding="UTF-8"?>
<jboss-web>
    <security-domain>java:/jaas/foo</security-domain>
    <context-root>/</context-root>
</jboss-web>

Bereitstellung von foo.Krieg führt zu:

INSTALLIEREN: Fehler beim verarbeiten des phase-INSTALLATION deployment "foo".Krieg"

Verursacht durch: org.jboss.msc.service.DuplicateServiceException: Service
jboss.web.- Bereitstellung.default-host./.Reich ist bereits registriert

Was ist die richtige Konfiguration? Wo ist der Fehler???

InformationsquelleAutor Fabio B. | 2013-02-04

Schreibe einen Kommentar