Open the menu

    Nginx

    The steps below show how to configure Nginx as a web server. It is assumed that the application server has the portal application accessible via an HTTP port.

    The configurations presented are the necessary ones to appropriately forward requests to the portal application on the application server. Other advanced configurations for optimization purposes are also recommended for production environments, but this topic will not cover how to perform such optimizations.

    For more information about Nginx, see its documentation.

    Here are the necessary step-by-step instructions to perform the configuration:

    1. Configure the Nginx configuration file (by default in NGINX_HOME/conf/nginx.conf) a location corresponding to the Website of LumisXP. Note that other configurations of the server where the location will be placed, such as server_name and listen, must be compatible with the address of the corresponding Website.

      In the example below, the context of the portal application is root, and the path of the registered Website is also root. The application server is accessible at localhost on port 8080:

      It is important to inform that WEB_ROOT_PATH as in the example above must end with / so that NGINX can serve the static files. If it does not end, it will not serve the static files.

      In the example below, the context of the portal application is /portal and the path of the registered Website is /portal/website1. The application server is accessible at localhost on port 8080:

    2. Include in the Nginx configuration, in the context of the http element, the following directive:

    3. Include in the Nginx configuration, in the context of the corresponding server elements, the following directive to prevent multiple '/' from providing different URLs for the same resource:

    4. Include in the Nginx configuration, in the context of the corresponding server elements, the following directive to enable server-side include processing: