I'm running tomcat 7 and trying to run two different cas instances
under two different virtual hosts.
The other wrinkle is that I'm proxying from apache to tomcat via ajp.
I have WEB-INF/spring-configuration/propertyFileConfigurer.xml
pointing to different properties files on each instance, but they both
seem to be reading the same file.
apache:
<VirtualHost HOSTIP:443>
LogLevel notice
DocumentRoot /var/www/html
ServerName HOSTNAME
(ssl stuff elided)
ProxyPass /cas ajp://localhost:8009/cas
</VirtualHost>
<VirtualHost HOSTIP:8090>
LogLevel notice
DocumentRoot /var/www/html
ServerName HOSTNAME
SSLEngine on
(ssl stuff elided)
ProxyPass / ajp://vhost1:8009/
ProxyPassReverse / ajp://vhost1:8009/
</VirtualHost>
tomcat (server.xml):
<Host name="localhost" appBase="/var/empty/tomcat7"
unpackWARs="true" autoDeploy="true">
</Host>
<Host name="vhost1" appBase="/home/christes/public_java/webapps"
unpackWARs="true" autoDeploy="true">
/home/christes/public_java/webapps/cas/WEB-INF/spring-configuration/propertyFileConfigurer.xml
<bean id="propertyPlaceholderConfigurer"
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"
p:location="file:/home/christes/cas/cas.properties" />
/home/christes/cas/cas.properties
cas.securityContext.serviceProperties.service=https://HOSTNAME:8090/cas/services/j_acegi_cas_security_check
# Names of roles allowed to access the CAS service manager
cas.securityContext.serviceProperties.adminRoles=ROLE_ADMIN
cas.securityContext.casProcessingFilterEntryPoint.loginUrl=https://HOSTNAME:8090/cas/hurderos/login
cas.securityContext.ticketValidator.casServerUrlPrefix=https://HOSTNAME:8090/cas
cas.themeResolver.defaultThemeName=cas-theme-default
cas.viewResolver.basename=default_views
host.name=HOSTNAME
database.hibernate.dialect=org.hibernate.dialect.MySQLDialect
/var/empty/tomcat7/webapps/cas/WEB-INF/spring-configuration/propertyFileConfigurer.xml
<bean id="propertyPlaceholderConfigurer"
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"
p:location="file:/etc/cas/cas.properties" />
/etc/cas/cas.properties
cas.securityContext.serviceProperties.service=https://HOSTNAME/cas/services/j_acegi_cas_security_check
# Names of roles allowed to access the CAS service manager
cas.securityContext.serviceProperties.adminRoles=ROLE_ADMIN
cas.securityContext.casProcessingFilterEntryPoint.loginUrl=https://HOSTNAME/cas/hurderos/login
cas.securityContext.ticketValidator.casServerUrlPrefix=https://HOSTNAME/cas
cas.themeResolver.defaultThemeName=cas-theme-default
cas.viewResolver.basename=default_views
host.name=HOSTNAME
database.hibernate.dialect=org.hibernate.dialect.MySQLDialect
/home/christes/cas/cas.properties exists and is world readable (and
the directories above it). Tomcat is reading the file since removing
it
results in an exception thrown.
I can browse to https://HOSTNAME/cas/manager and get bounced to
https://HOSTNAME/cas/login just fine, however
https://HOSTNAME:8090/cas/manager
bounces me to https://HOSTNAME/cas/login instead of
https://HOSTNAME:8090/cas/login I have verified that cas on :8090 is
reading /etc/cas/cas.properties
because changing the hostnames in /etc/cas/cas.properties to
foo.bar.com results in
https://HOSTNAME:8090/cas/manager trying to go to foo.bar.com
Am I doing something wrong, or is this a spring properties file
configurer limitation?
Thanks,
Eric
--
You are currently subscribed to [email protected] as:
[email protected]
To unsubscribe, change settings or access archives, see
http://www.ja-sig.org/wiki/display/JSG/cas-user