If, like me, you were installing a QGIS server using a bare metal configuration on Ubuntu or Debian recently, you may have noticed that the landing page of the server isn't there anymore after completing the deployment procedure specified here.
Indeed, the problem is due to the fact that the resource is not packaged correctly on Debian-based distributions. You can find more information about this issue here.
But if, like me, you miss the landing page that allows you to see all your published QGIS projects with a single click and would like to get it back without waiting any longer, you can simply follow this tutorial.
Step 1 : Retrieve the landing page from github
In this step, we will retrieve the repository of the landing page from the related GitHub page here, using the following command:
git clone https://github.com/elpaso/qgis-server-landing-page-plugin.git
After cloning the repository we'll need to navigate to the folder app in it.
cd qgis-server-landing-page-plugin/plugins/landingpage/app/
Step 2 : Install and building
Before building anything in the app, you must ensure that a Docker instance is running on your server. You can check here if you don't know how to proceed. You will also need to have the Yarn package installed on your machine; you can check here for more information.
Once everything is installed on the machine, we can proceed with the app installation by running the following command:
sudo ../../../vue yarn install
Then we could build the app with:
sudo ../../../vue yarn build
If you encounter a permission issue during the installation, you can modify the permissions of the 'app' folder using this command:
sudo chmod 777 -R /path/to/the/app/folder/
If the build goes well, you should now have a new folder called dist within the app folder. This is the file we are going to use for our server.
Step 3 : Move and relaunch
now, we're going to move the content of the dist folder into the folder that Qgis server use for the landing page in production using the following command:
sudo mv dist/*
/usr/share/qgis/resources/server/api/ogc/static/landingpage/
Now, every file should be in the right folder. You can verify this using the ls command on /usr/share/qgis/resources/server/api/ogc/static/landingpage/
After that, everything should be fine. You can relaunch Nginx on your server, and the landing page should be back again! You can also remove the repository from your machine as it's no longer needed.