Skip to content

Redirection error when multiple ports on the same server #21

@liunancun

Description

@liunancun

Tomcat and Nginx are installed on one server at the same time, the port number of Tomcat is 8080, and the port number of Nginx is 8081, and the service can be accessed normally through http://192.168.99.123:8080 and http://192.168.99.123:8080 .

The web.xml part is configured as follows:

<filter>
	<filter-name>CAS Validation Filter</filter-name>
	<filter-class>org.jasig.cas.client.validation.Cas30ProxyReceivingTicketValidationFilter</filter-class>
	<init-param>
		<param-name>casServerUrlPrefix</param-name>
		<param-value>http://192.168.99.214:8088/sso</param-value>
	</init-param>
	<init-param>
		<param-name>serverName</param-name>
		<param-value>http://192.168.99.123:8080 http://192.168.99.123:8081</param-value>
	</init-param>
	<init-param>
		<param-name>encodeServiceUrl</param-name>
		<param-value>false</param-value>
	</init-param>
</filter>
<filter-mapping>
	<filter-name>CAS Validation Filter</filter-name>
	<url-pattern>/*</url-pattern>
</filter-mapping>
<filter>
	<filter-name>CAS Authentication Filter</filter-name>
	<filter-class>org.jasig.cas.client.authentication.AuthenticationFilter</filter-class>
	<init-param>
		<param-name>casServerLoginUrl</param-name>
		<param-value>http://192.168.99.214:8088/sso/login</param-value>
	</init-param>
	<init-param>
		<param-name>serverName</param-name>
		<param-value>http://192.168.99.123:8080 http://192.168.99.123:8081</param-value>
	</init-param>
	<init-param>
		<param-name>ignorePattern</param-name>
		<param-value>logout</param-value>
	</init-param>
</filter>
<filter-mapping>
	<filter-name>CAS Authentication Filter</filter-name>
	<url-pattern>/*</url-pattern>
</filter-mapping>

The problem that arises now is:
When accessing the service through http://192.168.99.123:8081, it will redirect back to http://192.168.99.123:8080

Is there any way to solve this kind of problem?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions