RE: how to hide the port number 8443

Scarletake Bwi, modified 4 Years ago. Expert Posts: 327 Join Date: 12/20/10 Recent Posts

hi

 

i use 6.2, server be triggered by eclpise, and i try to add ssl, follow the steps with

https://liferay.dev/blogs/-/blogs/ssl-configuration-in-liferay-https-

it works.

now it will redirect even user try use http, it will auto-redirect to https

but, it will add port number behind, for example

user type "http://mysite"

it will redirect to "https://mysite:8443"

i try add in portal-ext.properties

web.server.https.port=8443

does not work.

 

thumbnail
Christoph Rabel, modified 4 Years ago. Liferay Legend Posts: 1555 Join Date: 9/24/09 Recent Posts

Can you check your server.xml for a linke like this:

<Connector port="80" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" URIEncoding="UTF-8"/>

and change the port to 443?

Does that help?

Scarletake Bwi, modified 4 Years ago. Expert Posts: 327 Join Date: 12/20/10 Recent Posts

thank you. i will try when the server not buzy.

and i will reply the result.

 

again, thank you

thumbnail
Olaf Kock, modified 4 Years ago. Liferay Legend Posts: 6441 Join Date: 9/23/08 Recent Posts

Extending on Christoph's answer: The only way to eliminate the port number is to use the default port, which is 443 - all other ports will need to be specified explicitly.

As is mentioned in Arun's comment to the article you link, I'm recommending to use a reverse proxy in a non-development environment. On operating systems like Linux, you'll have problems binding ports lower than 1024 if you're not root - and by no means do you want to run a web-facing server as root. A reverse proxy neatly masks that requirement.