5 Replies Latest reply on Jan 28, 2014 4:17 AM by JuYeon Yu

    WildFly 8 CR1 with mod_cluster + Spring Security Application redirect wrong port

    JuYeon Yu Newbie

      I try to my spring framework based web application deploy at wildFly 8 CR1 with mod_cluster.

       

      All most is fine.

       

      But, When Spring Security Redirect to Login Form page, It return wrong port number.

       

      Same configuration is working JBoss AS 7.

       

      try to access http://localhost/ that response is redirect to http://localhost:8009/spring-form-login

       

      I use apache 2.2.26 + mod_cluster 1.2.6 Final.

       

      And my configuration is below.

       

      LoadModule slotmem_module modules/mod_slotmem.so

      LoadModule manager_module modules/mod_manager.so

      LoadModule proxy_cluster_module modules/mod_proxy_cluster.so

      LoadModule advertise_module modules/mod_advertise.so

       

      Listen 192.168.10.215:7777

       

      <VirtualHost *:7777>

          <Directory />

              Order deny,allow

              Allow from all

          </Directory>

          <Location /mod_cluster-manager>

              SetHandler mod_cluster-manager

              Order deny,allow

              Allow from all

          </Location>

          KeepAliveTimeout 60

          AllowDisplay On

          ServerAdvertise On 192.168.10.215:7777

          EnableMCPMReceive

      </VirtualHost>

       

      NameVirtualHost *:80


      <VirtualHost *:80>

          ServerAdmin webmaster@dummy-host.example.com

          ServerName wildfly.crscube.co.kr

          ErrorLog "logs/wildfly-host.example.com-error_log"

          CustomLog "logs/wildfly-host.example.com-access_log" common

          LogLevel debug

          ProxyPass / balancer://mycluster/

          ProxyPassReverse / balancer://mycluster/

      </VirtualHost>


      And standalong.xml configuration like this.


      <subsystem xmlns="urn:jboss:domain:modcluster:1.2">

          <mod-cluster-config advertise-socket="modcluster" proxy-list="192.168.10.215:7777" balancer="mycluster" excluded-contexts="invoker,jbossws,juddi,console" load-balancing-group="myclustergroup" connector="ajp">

              <dynamic-load-provider>

                  <load-metric type="busyness"/>

              </dynamic-load-provider>

          </mod-cluster-config>

      </subsystem>

      .....

      <subsystem xmlns="urn:jboss:domain:undertow:1.0">

          <buffer-caches>

              <buffer-cache name="default" buffer-size="1024" buffers-per-region="1024" max-regions="10"/>

          </buffer-caches>

          <server name="default-server">

              <ajp-listener name="ajp" scheme="http" socket-binding="ajp"/>

              <http-listener name="default" socket-binding="http"/>

              <host name="default-host" alias="localhost"/>

          </server>

          <servlet-container name="default" default-buffer-cache="default" stack-trace-on-error="local-only">

              <jsp-config/>

              <persistent-sessions/>

          </servlet-container>

      </subsystem>

       

      And Spring Security Test Application Configuration like this. (Spring Framework 4.0.0.RELEASE +  Spring Security 3.2.0.RELEASE)

      <security:http>

          <security:intercept-url pattern="/**" access="ROLE_USER"/>

          <security:form-login/>

          <security:logout logout-url="/logout"/>

      </security:http>

       

       

      <security:authentication-manager>

          <security:authentication-provider>

              <security:user-service>

                  <security:user name="test" authorities="ROLE_USER" password="security"/>

              </security:user-service>

          </security:authentication-provider>

      </security:authentication-manager>

       

      Please answer my question. I don't know solution.

       

      This configuration at JBoss AS 7 work.