[Liferay] How to load https for Liferay content behind reverse proxy

Normally, Liferay does not load the https URL with variables $ javascript_folder, $ css_folder, browser will block the insecure content (usually javascript, css and image) and website show will fail.
[blocked] The page at 'https://example.com/' was loaded over HTTPS, but ran insecure content from 'http://example.com/notifications-portlet/notifications/js/main.js?browserId=other&minifierType=js&languageId=en_US&b=6201&t=1399630101000': this content should also be loaded over HTTPS.

[blocked] The page at 'https://example.com/' was loaded over HTTPS, but ran insecure content from 'http://example.com/vnhomnay-theme/css/aui.css?browserId=other&themeId=…WAR_vnhomnaytheme&minifierType=css&languageId=en_US&b=6201&t=1399942235000': this content should also be loaded over HTTPS.
File portal-ext.properties have 1 option available allows us to set the preferred protocol.
# 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=80
web.server.https.port=443

#
# Set the hostname that will be used when the portlet generates URLs.
# Leaving this blank will mean the host is derived from the servlet
# container.
#
web.server.host=
#
# Set the preferred protocol.
#
web.server.protocol=https
This setting will help liferay load all content on https website mentioned being accessed via this protocol.
This is a very important note when deployed as Apache reverse proxy (using proxy_mod) and Nginx.

URLs:
http://www.liferay.com/community/forums/-/message_boards/message/37464720
https://github.com/liferay/liferay-portal/blob/6.2.1-ga2/portal-impl/src/portal.properties#L8538-8560