I have Apache in front and then tomcat. Problem is am getting assets url(url of JavaScript and CSS files) as https://_xxx.com:3100/ when I check in the browser console.
I want to avoid the port number, I want those assets to be served on port 443 so that the urls would be: https://_xxx.com/
I have tried setting portal.instance.https.port=false but that didn't remove the port number.
How can I configure things in Liferay so that those assets are served over port 443?
This is rather a configuration issue, and normally, in these kind of scenarios you do not want Liferay's port to be visible at all. Please check your port properties:
web.server.https.port=443
web.server.http.port=80
web.server.protocol=https
Additionally, your proxy needs to be set up in a way that tells Liferay that it is running behind a proxy for a more complete set up:
web.server.forwarded.host.enabled=true
web.server.forwarded.host.header=X-Forwarded-Host
web.server.forwarded.port.enabled=true
web.server.forwarded.port.header=X-Forwarded-Port
web.server.forwarded.protocol.enabled=true
web.server.forwarded.protocol.header=X-Forwarded-Proto
To get an example of configuration for your apache proxy instance, you can use this link: liferay-behind-a-reverse-proxy