Forums de discussion
Server runs https but PortletUtil.isSecure still returns false
Koen De Jaeger, modifié il y a 10 années.
Server runs https but PortletUtil.isSecure still returns false
New Member Publications: 13 Date d'inscription: 14/09/10 Publications récentes
Our server (https://mijn.pvda.nl/) is running on https.
Apache was configured by another company, so I don't know the details. It seems it redirects all traffic to https.
I had to add "web.server.protocol=https" for Liferay to generate the links in https.
Everything works fine but PortletUtil.isSecure still returns false in portlets like Google Maps. I also verified with the scriptingconsole with "println(actionRequest.isSecure());". Also returns 'false'.
Can I still change some portal-env property entry to fix this or would it be the apache/tomcat configuration that needs to be adapted?
I have not yet overridden these:
#
# Set the HTTP and HTTPs ports when running the portal in a J2EE server that
# is sitting behind another web server like Apache. Set the values to -1 if
# the portal is not running behind another web server like Apache.
#
web.server.http.port=-1
web.server.https.port=-1
II think I have to add these ports (80/443). I wonder if this is really necessary though and if it would solve the problem.
Apache was configured by another company, so I don't know the details. It seems it redirects all traffic to https.
I had to add "web.server.protocol=https" for Liferay to generate the links in https.
Everything works fine but PortletUtil.isSecure still returns false in portlets like Google Maps. I also verified with the scriptingconsole with "println(actionRequest.isSecure());". Also returns 'false'.
Can I still change some portal-env property entry to fix this or would it be the apache/tomcat configuration that needs to be adapted?
I have not yet overridden these:
#
# Set the HTTP and HTTPs ports when running the portal in a J2EE server that
# is sitting behind another web server like Apache. Set the values to -1 if
# the portal is not running behind another web server like Apache.
#
web.server.http.port=-1
web.server.https.port=-1
II think I have to add these ports (80/443). I wonder if this is really necessary though and if it would solve the problem.
David H Nebinger, modifié il y a 10 années.
RE: Server runs https but PortletUtil.isSecure still returns false
Liferay Legend Publications: 14915 Date d'inscription: 02/09/06 Publications récentes
Could be apache is using AJP to communicate w/ your Liferay instance. Setting the https flags just has Liferay generate the URLs to be https, doesn't mean that it is necessarily using https itself.
Koen De Jaeger, modifié il y a 10 années.
RE: Server runs https but PortletUtil.isSecure still returns false
New Member Publications: 13 Date d'inscription: 14/09/10 Publications récentes
I got some feedback.
Apparently they avoided AJP because they had a problem with configuring that.
Tomcat is still on the http connector and apache is done with ProxyPass.
Apache :
ProxyRequests Off
ProxyPreserveHost On
ProxyPass / http://localhost:8081/
ProxyPassReverse / http://localhost:8081/
I guess they could try to follow both of your guides ? :
https://www.liferay.com/web/26526/blog/-/blogs/fronting-liferay-tomcat-with-apache-httpd-daemon
https://www.liferay.com/web/26526/blog/-/blogs/liferay-and-ssl
Apparently they avoided AJP because they had a problem with configuring that.
Tomcat is still on the http connector and apache is done with ProxyPass.
Apache :
ProxyRequests Off
ProxyPreserveHost On
ProxyPass / http://localhost:8081/
ProxyPassReverse / http://localhost:8081/
I guess they could try to follow both of your guides ? :
https://www.liferay.com/web/26526/blog/-/blogs/fronting-liferay-tomcat-with-apache-httpd-daemon
https://www.liferay.com/web/26526/blog/-/blogs/liferay-and-ssl
David H Nebinger, modifié il y a 10 années.
RE: Server runs https but PortletUtil.isSecure still returns false
Liferay Legend Publications: 14915 Date d'inscription: 02/09/06 Publications récentes
well i'm using ajp in my guides, but they should help you get up and running that way...
Mika Koivisto, modifié il y a 10 années.
RE: Server runs https but PortletUtil.isSecure still returns false (Réponse)
Liferay Legend Publications: 1519 Date d'inscription: 07/08/06 Publications récentes
Tomcat doesn't know it's on https when it's configured like that. That is why request.isSecure() returns false. To fix that you could create a new http connector in tomcat and set secure="true" in it. That way when you ask the container if the request is secure it will say yes.