Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redirection error when multiple ports on the same server #21

Open
liunancun opened this issue Mar 29, 2023 · 0 comments
Open

Redirection error when multiple ports on the same server #21

liunancun opened this issue Mar 29, 2023 · 0 comments

Comments

@liunancun
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant