Report this

What is the reason for this report?

Application is not redirecting to HTTPS

Posted on April 29, 2020

Hi,

I have deployed JAVA Application on Tomcat Server in the droplet IP address.

I have created new SSL certificate from Godaddy and applied. Set forwarding to HTTPS 443 rule and droplet HTTP 8080 post.

Both the load balancer and droplets status are healthy.

My application is running at port 8080.

Also, I enabled force HTTPS settings in the load balancer settings.

But my Java application still runs on HTTP port. Not redirected HTTPS.

I have added IP address as ‘A’ in GoDaddy and domain settings of DigitalOcean.

Please let me know how to solve this issue.

Thanks

Nitin C N



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hi @kiran306 ,

Can you use HTTPS service normally?If your answer is yes,maybe the following steps can help you config HTTPS force.

#add these after tomcat\conf\web.xml </welcome-file-list>

<login-config>
  <!-- Authorization setting for SSL -->
	<auth-method>CLIENT-CERT</auth-method>
 	<realm-name>Client Cert Users-only Area</realm-name>
</login-config>

<security-constraint>
  <!-- Authorization setting for SSL -->
	<web-resource-collection >
		<web-resource-name >SSL</web-resource-name>
		<url-pattern>/*</url-pattern>
	</web-resource-collection>
	<user-data-constraint>
		<transport-guarantee>CONFIDENTIAL</transport-guarantee>
	</user-data-constraint>
</security-constraint>

Finally it should be like this:

Please use ports that support HTTPS protocol if you only have one,don’t set it to redirect.In this time you should directly type in https://IPAddr or Domain name:port

Let me know if you have further questions, Shiroka

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.