From f90d204271a15d152bb7e067061b614ec59b4063 Mon Sep 17 00:00:00 2001 From: Stephane de Labrusse Date: Tue, 3 Feb 2026 17:45:25 +0100 Subject: [PATCH 1/8] Add LAMP documentation to the index and create lamp.rst file --- index.rst | 1 + lamp.rst | 114 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 115 insertions(+) create mode 100644 lamp.rst diff --git a/index.rst b/index.rst index 8d90e65f..0f76a8f4 100644 --- a/index.rst +++ b/index.rst @@ -73,6 +73,7 @@ NethServer 8 administrator manual dokuwiki dependencytrack + lamp mariadb passbolt prometheus diff --git a/lamp.rst b/lamp.rst new file mode 100644 index 00000000..b87422c9 --- /dev/null +++ b/lamp.rst @@ -0,0 +1,114 @@ +.. _lamp-section: + +==== +LAMP +==== + +NS8-LAMP is a containerized environment that encapsulates the LAMP stack, which includes +Linux (Ubuntu), Apache (web server), MariaDB (database), and PHP (scripting language). +This container allows for easy deployment and management of web applications, providing +consistency, portability, and isolation across different environments. + +Installation +============ + +The application can be installed from the :ref:`software_center-section`. + +Configuration +============= + +After installation, access the application settings page to configure your LAMP instance. + +Main settings +------------- + +The following settings are available during configuration: + +* **Fully Qualified Domain Name (FQDN)**: set the domain name for your web application +* **HTTP to HTTPS**: enable automatic redirection from HTTP to HTTPS +* **Request Let's Encrypt certificate**: automatically obtain and configure a free SSL certificate +* **MySQL Configuration**: + + * **MySQL Admin Password**: password for the MySQL root user to manage all databases + * **Create Database and User**: optionally create a database with a dedicated user during setup + + * **Database Name**: name of the database to create + * **Database User**: username for database access + * **Database User Password**: password for the database user + +* **PHP Configuration**: + + * **PHP Version**: select the PHP version to use (customizable to match your application requirements) + * **PHP Upload Max Filesize**: maximum allowed size for file uploads in megabytes (default: 100) + * **PHP Memory Limit**: maximum amount of memory a PHP script can consume in megabytes + * **PHP Max Execution Time Limit**: maximum time in seconds a PHP script is allowed to run before being terminated + +After configuring these settings, click :guilabel:`Save` to apply the changes. + +Usage +===== + +Application deployment +---------------------- + +The LAMP stack provides a ``/app`` directory as the storage location for your web application files. + +To access the application directory and deploy your files: + +1. Connect to the server via SSH +2. Use the following command to access the Apache container:: + + runagent -m lamp1 podman exec -ti apache2-app bash + + Replace ``lamp1`` with your actual module instance name. + +3. Navigate to the ``/app`` directory and place your web application files there +4. The files will be automatically served through the FQDN configured in the web interface + +.. warning:: + + After deploying your web application, delete the default ``phpinfo.php`` file + in the ``/app`` folder to avoid exposing sensitive information about your server configuration. + +Database management +------------------- + +PhpMyAdmin is included and accessible through your domain at the ``/phpmyadmin`` path +(e.g., ``https://yourdomain.com/phpmyadmin``). + +Default credentials: + +* Username: ``admin`` +* Password: the MySQL admin password set during configuration + +.. warning:: + + Change the default PhpMyAdmin access credentials immediately after first login + for security purposes. + +Advanced configuration +====================== + +Environment access +------------------ + +To debug a container or view its environment variables:: + + runagent -m lamp1 + +Replace ``lamp1`` with your actual module instance name. + +Scheduled tasks +--------------- + +You can configure cron jobs for your LAMP instance using:: + + runagent -m lamp1 apache2-app crontab -e + +Example cron job to run a daily backup at 2:00 AM:: + + 0 2 * * * /path/to/backup-script.sh + +To verify configured cron jobs:: + + podman exec -ti apache2-app crontab -l From 1ddec23f82e02c7505c48865ef7729397d73920e Mon Sep 17 00:00:00 2001 From: Stephane de Labrusse Date: Wed, 4 Feb 2026 10:43:15 +0100 Subject: [PATCH 2/8] Add methods for downloading web applications in lamp.rst --- lamp.rst | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/lamp.rst b/lamp.rst index b87422c9..8850a303 100644 --- a/lamp.rst +++ b/lamp.rst @@ -65,6 +65,47 @@ To access the application directory and deploy your files: 3. Navigate to the ``/app`` directory and place your web application files there 4. The files will be automatically served through the FQDN configured in the web interface +Downloading your web application +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Once inside the ``/app`` directory, you can download your web application files using one of the following methods: + +**Git** + +Clone a Git repository to download your application code:: + + git clone http://github.com/url/of/project + +**Wget** + +Download files using wget, a command-line tool for downloading files from the web:: + + wget http://your-url + +**Rsync** + +Use rsync to synchronize files from a remote server:: + + rsync -avz user@hostname:/path . + +**SFTP** + +Open an interactive SFTP session to transfer files securely:: + + sftp user@hostname + +**FTP** + +Use standard FTP protocol for file transfer:: + + ftp hostname + +**FTP-SSL** + +Use FTP with SSL/TLS encryption for secure file transfer:: + + ftp-ssl hostname + .. warning:: After deploying your web application, delete the default ``phpinfo.php`` file From 0609ddddb5760ca085623a4dac10ff813589e708 Mon Sep 17 00:00:00 2001 From: Stephane de Labrusse Date: Wed, 4 Feb 2026 11:37:59 +0100 Subject: [PATCH 3/8] Clarify examples for FQDN and PhpMyAdmin URL in lamp.rst --- lamp.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lamp.rst b/lamp.rst index 8850a303..9b3d72e0 100644 --- a/lamp.rst +++ b/lamp.rst @@ -24,7 +24,7 @@ Main settings The following settings are available during configuration: -* **Fully Qualified Domain Name (FQDN)**: set the domain name for your web application +* **Fully Qualified Domain Name (FQDN)**: set the domain name for your web application, for example, ``webapp1.example.org`` * **HTTP to HTTPS**: enable automatic redirection from HTTP to HTTPS * **Request Let's Encrypt certificate**: automatically obtain and configure a free SSL certificate * **MySQL Configuration**: @@ -115,7 +115,7 @@ Database management ------------------- PhpMyAdmin is included and accessible through your domain at the ``/phpmyadmin`` path -(e.g., ``https://yourdomain.com/phpmyadmin``). +(e.g., ``https://webapp1.example.org/phpmyadmin``). Default credentials: From 8943bc0d8afe9588777acf549fc917c510eae087 Mon Sep 17 00:00:00 2001 From: Stephane de Labrusse Date: Wed, 4 Feb 2026 15:36:10 +0100 Subject: [PATCH 4/8] Correct casing for "Lamp" and update configuration notes in lamp.rst --- lamp.rst | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/lamp.rst b/lamp.rst index 9b3d72e0..49765754 100644 --- a/lamp.rst +++ b/lamp.rst @@ -1,10 +1,10 @@ .. _lamp-section: ==== -LAMP +Lamp ==== -NS8-LAMP is a containerized environment that encapsulates the LAMP stack, which includes +Lamp is a containerized environment that encapsulates the Lamp stack, which includes Linux (Ubuntu), Apache (web server), MariaDB (database), and PHP (scripting language). This container allows for easy deployment and management of web applications, providing consistency, portability, and isolation across different environments. @@ -17,11 +17,15 @@ The application can be installed from the :ref:`software_center-section`. Configuration ============= -After installation, access the application settings page to configure your LAMP instance. +After installation, access the application settings page to configure your Lamp instance. Main settings ------------- +.. note:: + + DNS must be configured with your DNS provider to point to your server for both the FQDN and Let's Encrypt certificate to work properly. + The following settings are available during configuration: * **Fully Qualified Domain Name (FQDN)**: set the domain name for your web application, for example, ``webapp1.example.org`` @@ -51,7 +55,7 @@ Usage Application deployment ---------------------- -The LAMP stack provides a ``/app`` directory as the storage location for your web application files. +The Lamp stack provides a ``/app`` directory as the storage location for your web application files. To access the application directory and deploy your files: @@ -65,8 +69,8 @@ To access the application directory and deploy your files: 3. Navigate to the ``/app`` directory and place your web application files there 4. The files will be automatically served through the FQDN configured in the web interface -Downloading your web application -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Install your PHP source code +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Once inside the ``/app`` directory, you can download your web application files using one of the following methods: @@ -130,19 +134,10 @@ Default credentials: Advanced configuration ====================== -Environment access ------------------- - -To debug a container or view its environment variables:: - - runagent -m lamp1 - -Replace ``lamp1`` with your actual module instance name. - Scheduled tasks --------------- -You can configure cron jobs for your LAMP instance using:: +You can configure cron jobs for your Lamp instance using:: runagent -m lamp1 apache2-app crontab -e From 8420a7830cc3da2586f9bd0d8795358c958cb843 Mon Sep 17 00:00:00 2001 From: Stephane de Labrusse Date: Wed, 4 Feb 2026 18:06:54 +0100 Subject: [PATCH 5/8] Refine instructions for deploying web applications and clarify file download methods in lamp.rst --- lamp.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lamp.rst b/lamp.rst index 49765754..5231a3a6 100644 --- a/lamp.rst +++ b/lamp.rst @@ -66,13 +66,13 @@ To access the application directory and deploy your files: Replace ``lamp1`` with your actual module instance name. -3. Navigate to the ``/app`` directory and place your web application files there +3. Place your web application files in the working directory 4. The files will be automatically served through the FQDN configured in the web interface Install your PHP source code ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Once inside the ``/app`` directory, you can download your web application files using one of the following methods: +You can download your web application files using one of the following methods: **Git** @@ -113,7 +113,7 @@ Use FTP with SSL/TLS encryption for secure file transfer:: .. warning:: After deploying your web application, delete the default ``phpinfo.php`` file - in the ``/app`` folder to avoid exposing sensitive information about your server configuration. + to avoid exposing sensitive information about your server configuration. Database management ------------------- From d2e0147b66721650de804b8f2be76494e0e695fc Mon Sep 17 00:00:00 2001 From: Stephane de Labrusse Date: Thu, 5 Feb 2026 09:49:28 +0100 Subject: [PATCH 6/8] Apply suggestions from code review Co-authored-by: Davide Principi --- lamp.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lamp.rst b/lamp.rst index 5231a3a6..4ee66703 100644 --- a/lamp.rst +++ b/lamp.rst @@ -4,7 +4,7 @@ Lamp ==== -Lamp is a containerized environment that encapsulates the Lamp stack, which includes +Lamp is a containerized environment that encapsulates a LAMP stack, which includes Linux (Ubuntu), Apache (web server), MariaDB (database), and PHP (scripting language). This container allows for easy deployment and management of web applications, providing consistency, portability, and isolation across different environments. @@ -55,7 +55,7 @@ Usage Application deployment ---------------------- -The Lamp stack provides a ``/app`` directory as the storage location for your web application files. +Lamp provides a ``/app`` directory as the storage location for your web application files. To access the application directory and deploy your files: From feddb72efccf558104f196f125ae1d4a64d4cf41 Mon Sep 17 00:00:00 2001 From: Stephane de Labrusse Date: Fri, 6 Feb 2026 10:51:11 +0100 Subject: [PATCH 7/8] Add example cron jobs for maintenance and log management in lamp.rst --- lamp.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lamp.rst b/lamp.rst index 4ee66703..402befbc 100644 --- a/lamp.rst +++ b/lamp.rst @@ -143,7 +143,9 @@ You can configure cron jobs for your Lamp instance using:: Example cron job to run a daily backup at 2:00 AM:: - 0 2 * * * /path/to/backup-script.sh + 0 2 * * * /app/maintenance.php # run maintenance script daily at 2:00 AM + 30 2 * * * rm -rf /app/temp/* # clear temporary files after backup + 0 3 * * * find /app/logs -type f -mtime +30 -delete # delete log files older than 30 days To verify configured cron jobs:: From 9b9ba3e9d792897f04d13b78654f6b1fba41df9b Mon Sep 17 00:00:00 2001 From: Stephane de Labrusse Date: Fri, 6 Feb 2026 11:53:12 +0100 Subject: [PATCH 8/8] Update cron job examples in lamp.rst --- lamp.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lamp.rst b/lamp.rst index 402befbc..386782e2 100644 --- a/lamp.rst +++ b/lamp.rst @@ -141,7 +141,7 @@ You can configure cron jobs for your Lamp instance using:: runagent -m lamp1 apache2-app crontab -e -Example cron job to run a daily backup at 2:00 AM:: +Here are some example cronjobs:: 0 2 * * * /app/maintenance.php # run maintenance script daily at 2:00 AM 30 2 * * * rm -rf /app/temp/* # clear temporary files after backup