Using a Web Server With the Liferay Platform

This article documents which properties should be configured if a web server sits in front of Liferay. If you do not set the following properties, you may encounter one of these issues.
  1. There could be UI issues such as images missing from stylesheets.
  2. Not being able to properly use web content structures/templates.
  3. Email notification URLs are appended with port number.


1. The following properties are the most important ones to be set when using a web server in front of Liferay. As you begin implementing these properties, please be sure to test fully with the web server in front of Liferay to ensure that everything continues to work as expected. If issues continue to occur, please verify that the property values are correct and that the web server has been configured correctly for its designed goal.

    # 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.

    # 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.

    # Set the preferred protocol.

2. The following properties are situational and, as such, should be carefully reviewed to see if they are a good fit for your environment and goals.

    # Set this to true to display the server name at the bottom of every page.
    # This is useful when testing clustering configurations so that you can know
    # which node you are accessing.

    # Set this to true to enable support for legacy proxy servers (Apache 1.x).

3. In addition, you will want to ensure that any accessing machines are allowed on the Redirect list with the following properties:

## Redirect

    # Set this property to "ip" or "domain" for the redirect security method. If
    # set to "domain", the portal will only redirect users to domains listed in
    # the property "redirect.url.domain.allowed". If set to "ip", the portal
    # will only redirect to domains whose IP address resolve to an IP address
    # listed in the property "redirect.url.ip.allowed".

    # Input a list of comma delimited domains which the portal is allowed to
    # redirect to. Input a blank list to allow any domain. Specifying a domain
    # with a leading "*." allows redirects to subdomains.

    # Input a list of comma delimited IPs which the portal is allowed to
    # redirect to. Input a blank list to allow any IP. SERVER_IP will be
    # replaced with the IP of the host server.

A related issue regarding redirect URLs can be found here.

Additional Information

Special instructions for IIS 7:


User created content (i.e., document titles, web content, etc.) appears with strange characters.


Double escaping must be enabled:

  1. Configure Request Filtering
  2. Choose Edit Feature Settings...
  3. Select Allow double escaping
  4. Hit Ok
2 人中有 2 人觉得有帮助