lizmap / lizmap-webdav-module
Jelix module for Lizmap, enabling WebDAV.
Fund package maintenance!
www.3liz.com/en/contacts.html
Installs: 0
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
Type:jelix-module
Requires
- sabre/dav: ~4.7.0
This package is not auto-updated.
Last update: 2025-08-28 20:43:00 UTC
README
This is a module for Lizmap 3.6 and newer, allowing to push QGIS projects into Lizmap with the WebDAV protocol.
The module installs a new entry point: dav.php
If the Lizmap Web Client is accessible at the web address http://lizmap.local/
:
- the webdav address is
http://lizmap.local/dav.php/
- a lizmap repository is available at
http://lizmap.local/dav.php/repository_directory_name/
- a QGIS project at
http://lizmap.local/dav.php/repository_directory_name/qgis_project_name.qgs
- a lizmap config at
http://lizmap.local/dav.php/repository_directory_name/qgis_project_name.qgs.cfg
.
Installation
Once Lizmap Web Client 3.6+ application is installed and working, you can install the webdav module. It is recommended to install the module with Composer, the package manager for PHP.
Automatic installation with Composer and lizmap 3.4 or higher
- into
lizmap/my-packages
, create the filecomposer.json
(if it doesn't exist) by copying the filecomposer.json.dist
, and install the modules with Composer:
cp -n lizmap/my-packages/composer.json.dist lizmap/my-packages/composer.json
composer require --working-dir=lizmap/my-packages "lizmap/lizmap-webdav-module"
- Then go into
lizmap/install/
and execute Lizmap install scripts :
php configurator.php webdav php installer.php ./clean_vartmp.sh ./set_rights.sh
module configuration
Some configuration parameters can be set into a [webdav]
section of the
localconfig.ini.php
file.
By default, WebDAV is configured to use the root directory of repositories
indicated into the rootRepositories
parameter of lizmapConfig.ini.php
files.
If you want to use another directory (the parent directory for example),
indicate the full path into a rootPath
parameter. Example:
[webdav] rootPath="/srv/lizmap/data/"
If Qgis projects should be stored into a subdirectory of the root directory,
you should indicate its relative path into qgisDirectory
. Example:
[webdav] rootPath="/srv/lizmap/data/" qgisDirectory="qgis-projects/"
This value is indicated into lizmap metadata, so the Lizmap plugin for Qgis know where is the root directory of Qgis projects.
Obviously, rootRepositories
should then be /srv/lizmap/data/qgis-projects/
.
Following the example, URL to access to projects are:
- a lizmap repository is available at
http://lizmap.local/dav.php/qgis-projects/repository_directory_name/
- a QGIS project at
http://lizmap.local/dav.php/qgis-projects/repository_directory_name/qgis_project_name.qgs
- a lizmap config at
http://lizmap.local/dav.php/qgis-projects/repository_directory_name/qgis_project_name.qgs.cfg
.
You can also indicate the directory where to store COG files, within the COGDirectory
parameter. Example:
[webdav] rootPath="/srv/lizmap/data/" qgisDirectory="qgis-projects/" COGDirectory="cog-files/"
And finally, you can enable a webdav browser, allowing you to navigate
into all these directories, with your web browser. Set browserEnabled=on
.
Example:
[webdav] rootPath="/srv/lizmap/data/" qgisDirectory="qgis-projects/" COGDirectory="cog-files/" browserEnabled=on
Then go to the URL http://lizmap.local/dav.php/
.
PHP FPM configuration
You should create a new pool dedicated to dav, in order to have different PHP setup than the main www pool.
Into /etc/php/8.1/fpm/pool.d/
, copy the www.conf
to dav.conf
and change
these settings:
; choose a different port relative to the port indicated to www.conf listen = 9010 ; sets specific PHP admin value php_admin_flag[output_buffering] = off php_admin_value[max_input_time] = 3600 php_admin_value[max_execution_time] = 3600 ; the directory should be on the same partition as dir into nginx conf client_body_temp_path ; set the directory according to your system settings php_admin_value[upload_tmp_dir] = /var/cache/nginx/
Nginx configuration
In your vhost configuration, it is recommended to have a configuration specific to the dav.php script. For example:
# configuration for dav.php location ~* /dav\.php { # specific configuration to support download/upload of big files client_max_body_size 0; fastcgi_request_buffering off; fastcgi_buffers 64 4K; fastcgi_read_timeout 3600s; fastcgi_send_timeout 3600s; proxy_buffering off; proxy_read_timeout 3600s; proxy_send_timeout 3600s; send_timeout 3600s; keepalive_timeout 3600s; # should be in the same partition of php upload_tmp_dir client_body_temp_path /var/cache/nginx 1 2; # classical configuration for PHP fastcgi_split_path_info ^(.+\.php)(/.*)$; set $path_info $fastcgi_path_info; try_files $fastcgi_script_name =404; include fastcgi_params; fastcgi_index dav.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param SERVER_NAME $http_host; fastcgi_param PATH_INFO $path_info; fastcgi_param PATH_TRANSLATED $document_root$path_info; # set the port indicated into the pool dav.conf of php-fpm fastcgi_pass lizmap:9010; } # configuration for any php file location ~* /\w+\.php { fastcgi_split_path_info ^(.+\.php)(/.*)$; set $path_info $fastcgi_path_info; # because of bug http://trac.nginx.org/nginx/ticket/321 try_files $fastcgi_script_name =404; include fastcgi_params; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param SERVER_NAME $http_host; fastcgi_param PATH_INFO $path_info; fastcgi_param PATH_TRANSLATED $document_root$path_info; # classical port of pool www.conf fastcgi_pass lizmap:9000; }
Resources about configuration
See these websites in order to tweak PHP-fpm and nginx configuration: