Advanced installation configuration

Lizmap behind a proxy/reverse proxy

Sometimes, some URL in Lizmap may not what you wanted. For example, there are using the “http” protocol instead of the “https” protocol. Or it may content an unwanted port ( http://mydomain:5468/ instead of http://mydomain/ ). Or url may not contain the real domain name.

In most of case, this is because the web server or PHP-fpm is behind a master web server (which act as a proxy or reverse proxy), and then environment parameters given by PHP or the backend web server to Lizmap are wrong.

You can tell to Lizmap to force to HTTPS, to use the right domain or to use the right port.

In localconfig.ini.php, you can use these following configuration parameters.

To force to use the port 80 (true) or the 8080 for example with the http protocol:

forceHTTPPort = true
# or
forceHTTPPort = 8080

To force to use the port 443 (true) or the 8443 for example with the https protocol:

forceHTTPSPort = true
# or
forceHTTPSPort = 8443

To specify the domain name of your Lizmap application, if Lizmap cannot guess it:

domainName =

If the URL path of the backend web server does not correspond to the URL path of the frontal web server (ex: the proxy redirects urls like to your web server, You have to indicate the “public” URL path (basePath) and the backend URL Path (backendBasePath):

basePath= /
backendBasePath = /foo/bar

If the reverse proxy redirect HTTPS request to HTTP, you must deactivate the HTTPS check:

checkHttpsOnParsing = off

Starting with Lizmap 3.0.18 and 3.1.6, you can indicate to force all generated URL with the HTTPS protocol, when Lizmap doesn’t know what is the protocol used by requests on the reverse proxy:

checkHttpsOnParsing = off
forceProxyProtocol = https

Using environment variables

If some credentials or parameters are available in environment variables, you can indicate use them into the localconfig.ini.php or profiles.ini.php files. Be sure the environment variables are available to the PHP-FPM process or the APACHE/NGINX process.

Into this files, use the syntax ${VARIABLE_NAME}.

For example, to indicate postgresql credentials stored into these variables :


You write this configuration into profiles.ini.php: