3liz / lizmap-web-client

Transfer a QGIS project on a server, Lizmap is providing the web interface to browse it
https://www.lizmap.com
Mozilla Public License 2.0
260 stars 143 forks source link

Lizmap Installation with URL prefix #1773

Closed lukasspettel closed 4 years ago

lukasspettel commented 4 years ago

Description

I am trying to install Lizmap on a server that runs on a portal:

portal.domain.com

The server itself runs on the portal with a prefix(?) added to the url that the server is unaware of to my understanding.

portal.domain.com/prefix

So when I install Lizmap on the server I can access the landing page (no css) but any generated links will point to portal.domain.com/lizmap.

I did not find any solution to this problem.

How can I include this prefix in the installation of lizmap?

Environment

laurentj commented 4 years ago

Did you try to rename the lizmap directory to prefix? Do not forget to remove all files from temp/lizmap/ after this change.

lukasspettel commented 4 years ago

I did try to do that. But then the URL for lizmap would be:

portal.domain.com/prefix/prefix

The prefix alone is a landing page for various projects of the portal.

I am currently trying to solve this problem with the urlengine documented in the advanced installation documentation.

Would I be able to solve it with the following settings in the localconfig.ini.php file?

[urlengine]
basePath= /prefix
backendBasePath = /
lukasspettel commented 4 years ago

I changed the localconfig.ini.php to the above mentioned settings and reinstalled Lizmap. Now there is an error when I try to open lizmap:

Error 500. A technical error has occured. Sorry for this trouble.
Error in the main configuration. A plugin doesn't exist

errors.log:

        0       trigger_error() /serverdata/www/lizmap-web-client-3.3.9_test/lib/jelix/core/jConfigCompiler.class.php : 454
        1       jConfigCompiler::_loadPluginsPathList() /serverdata/www/lizmap-web-client-3.3.9_test/lib/jelix/core/jConfigCompiler.class.php : 160
        2       jConfigCompiler::prepareConfig()        /serverdata/www/lizmap-web-client-3.3.9_test/lib/jelix/core/jConfigCompiler.class.php : 85
        3       jConfigCompiler::read() /serverdata/www/lizmap-web-client-3.3.9_test/lib/jelix/core/jConfigCompiler.class.php : 103
        4       jConfigCompiler::readAndCache() /serverdata/www/lizmap-web-client-3.3.9_test/lib/jelix/core/jConfig.class.php : 84
        5       jConfig::load() /serverdata/www/lizmap-web-client-3.3.9_test/lib/jelix/core/jApp.class.php : 145
        6       jApp::loadConfig()      /serverdata/www/lizmap-web-client-3.3.9_test/lizmap/www/index.php : 17
2020-08-25 12:51:36     172.17.0.1      [7]     Error in the main configuration. A plugin doesn't exist -- The coord plugin jacl2 is unknown.   /serverdata/www/lizmap-web-client-3.3.9_test/lib/jelix/core/jConfigCompiler.class.php   195
        /test/
array ( )

        0       jConfigCompiler::checkCoordPluginsPath()        /serverdata/www/lizmap-web-client-3.3.9_test/lib/jelix/core/jConfigCompiler.class.php : 161
        1       jConfigCompiler::prepareConfig()        /serverdata/www/lizmap-web-client-3.3.9_test/lib/jelix/core/jConfigCompiler.class.php : 85
        2       jConfigCompiler::read() /serverdata/www/lizmap-web-client-3.3.9_test/lib/jelix/core/jConfigCompiler.class.php : 103
        3       jConfigCompiler::readAndCache() /serverdata/www/lizmap-web-client-3.3.9_test/lib/jelix/core/jConfig.class.php : 84
        4       jConfig::load() /serverdata/www/lizmap-web-client-3.3.9_test/lib/jelix/core/jApp.class.php : 145
        5       jApp::loadConfig()      /serverdata/www/lizmap-web-client-3.3.9_test/lizmap/www/index.php : 17

This seems to be due to the changes in localconfig.ini.php.

lukasspettel commented 4 years ago

Problem was solved in Apache configuration on backend server with reverse proxy:

ProxyPass /lizmap/ http://localhost/prefix/lizmap/
ProxyPassReverse /lizmap/ http://localhost/prefix/lizmap/
nboisteault commented 4 years ago

@Lukas-tel Thanks for your feedback.