{"id":16694,"date":"2026-05-18T14:04:00","date_gmt":"2026-05-18T14:04:00","guid":{"rendered":"https:\/\/greenwebpage.com\/community\/?p=16694"},"modified":"2026-05-18T14:04:06","modified_gmt":"2026-05-18T14:04:06","slug":"how-to-install-phpmyadmin-and-secure-it-on-almalinux-10","status":"publish","type":"post","link":"https:\/\/greenwebpage.com\/community\/how-to-install-phpmyadmin-and-secure-it-on-almalinux-10\/","title":{"rendered":"How to Install phpMyAdmin and Secure It on AlmaLinux 10: A Complete Step-by-Step Guide"},"content":{"rendered":"\n<p>phpMyAdmin is one of the most popular web-based database administration interfaces in the world, and one of the most common attack points on Linux servers. By scanning any server&#8217;s access logs, you will see bots constantly probing the server for \/phpmyadmin, \/pma, \/myadmin, and many other default phpMyAdmin paths that are known for being scanned by bots looking to exploit known CVEs, brute force, and credential stuffing.<\/p>\n\n\n\n<p>In this tutorial, you&#8217;ll install phpMyAdmin with the <a href=\"https:\/\/greenwebpage.com\/community\/how-to-install-lamp-stack-on-debian-12\/\">full LAMP stack<\/a> (Apache, MariaDB, PHP) on AlmaLinux 10, and apply all the essential security measures: change the default root directory, implement HTTP Basic authentication, restrict access by IP, set security headers, and tighten file permissions.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><a id=\"post-16694-_d42cvd8ox2w1\"><\/a><strong>What is phpMyAdmin, and When Should You Use It?<\/strong><\/h2>\n\n\n\n<p>phpMyAdmin is an open-source PHP application that provides a Web interface for managing <a href=\"https:\/\/greenwebpage.com\/community\/how-to-install-and-secure-mysql-mariadb-on-almalinux-10\/\">MySQL and MariaDB databases<\/a>. It provides the ability to create and modify databases, execute SQL queries, import and export data, manage users and permissions, and monitor the status of the databases, without needing to access the database with a command line.<\/p>\n\n\n\n<p><a href=\"https:\/\/www.phpmyadmin.net\/\">phpMyAdmin<\/a> is suitable for development environments, for staging servers, and production servers where the administrator requires occasional GUI access to the database. It is not a substitute for a good database management procedure, and it should not be stored permanently on a server that is openly accessible on the internet, unprotected by multiple layers of authentication.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><a id=\"post-16694-_f8gnfclzhn0g\"><\/a><strong>How to Securely Install phpMyAdmin on AlmaLinux 10 with Apache and MariaDB<\/strong><\/h2>\n\n\n\n<p>To install and secure phpMyAdmin on <a href=\"https:\/\/greenwebpage.com\/community\/how-to-check-almalinux-version\/\">AlmaLinux 10<\/a>, set up a LAMP stack, install EPEL\/Remi repositories to get the latest PHP packages, and configure Apache .htaccess rules. Installing and securing phpMyAdmin on AlmaLinux 10 contains real terminal output, file permissions, MariaDB user hardening, security headers, and a custom URL alias.<\/p>\n\n\n\n<p>Let&#8217;s try to install phpMyAdmin and secure it using AlmaLinux 10.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a id=\"post-16694-_u5hgrpjvk0g4\"><\/a><strong>Step 1: Update AlmaLinux 10 and Install EPEL and Remi Repositories<\/strong><\/h3>\n\n\n\n<p>Before installing any software that is exposed to the Internet, always run the update system package index and apply pending <a href=\"https:\/\/greenwebpage.com\/community\/how-to-check-firewall-status-on-debian-13\/\">security updates<\/a>:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\n<p>sudo dnf update<\/p>\n<\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img fetchpriority=\"high\" decoding=\"async\" width=\"1125\" height=\"641\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-1.png\" alt=\"sudo dnf update\" class=\"wp-image-16695\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-1.png 1125w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-1-300x171.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-1-1024x583.png 1024w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-1-768x438.png 768w\" sizes=\"(max-width: 1125px) 100vw, 1125px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>Installing the Apache web server and all the PHP modules that are needed by phpMyAdmin 5.2. x. For AlmaLinux 10, the EPEL and Remi repositories offer the <a href=\"https:\/\/greenwebpage.com\/community\/how-to-install-php-on-debian-12\/\">latest PHP versions<\/a>. Enable them first:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\n<p>sudo dnf install epel-release -y<\/p>\n<p>sudo dnf install https:\/\/rpms.remirepo.net\/enterprise\/remi-release-10.rpm -y<\/p>\n<p>sudo dnf module enable php:remi-8.3 -y<\/p>\n<\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" width=\"1129\" height=\"612\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-2.png\" alt=\"sudo dnf module enable php:remi-8.3 -y\" class=\"wp-image-16696\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-2.png 1129w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-2-300x163.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-2-1024x555.png 1024w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-2-768x416.png 768w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-2-960x520.png 960w\" sizes=\"(max-width: 1129px) 100vw, 1129px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>Install Apache, then all of the necessary PHP extensions:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\n<p>sudo dnf install httpd php php-mbstring php-zip php-gd php-json \\<\/p>\n<p>php-curl php-xml php-mysqlnd php-opcache php-mcrypt -y<\/p>\n<\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" width=\"1125\" height=\"581\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-3.png\" alt=\"sudo dnf install httpd php php-mbstring php-zip php-gd php-json \\ php-curl php-xml php-mysqlnd php-opcache php-mcrypt -y\" class=\"wp-image-16697\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-3.png 1125w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-3-300x155.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-3-1024x529.png 1024w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-3-768x397.png 768w\" sizes=\"(max-width: 1125px) 100vw, 1125px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>Check Apache and PHP versions:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\n<p>httpd -v<\/p>\n<p>php -v<\/p>\n<\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1128\" height=\"362\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-4.png\" alt=\"httpd -v\" class=\"wp-image-16698\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-4.png 1128w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-4-300x96.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-4-1024x329.png 1024w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-4-768x246.png 768w\" sizes=\"(max-width: 1128px) 100vw, 1128px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>Check that all of the necessary PHP modules are installed:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\n<p>php -m | grep -E &#8220;mbstring|zip|gd|json|curl|xml|mysqli&#8221;<\/p>\n<\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1125\" height=\"415\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-5.png\" alt=\"php -m | grep -E &quot;mbstring|zip|gd|json|curl|xml|mysqli&quot;\" class=\"wp-image-16699\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-5.png 1125w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-5-300x111.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-5-1024x378.png 1024w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-5-768x283.png 768w\" sizes=\"(max-width: 1125px) 100vw, 1125px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a id=\"post-16694-_e3vv0hqb1x1w\"><\/a><strong>Step 2: Start and Enable Apache<\/strong><\/h3>\n\n\n\n<p><a href=\"https:\/\/greenwebpage.com\/community\/how-to-install-apache-web-server-on-ubuntu-22-04\/\">Start the Apache HTTP server<\/a>; make it auto-start when booting the system:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\n<p>sudo systemctl enable httpd &#8211;now<\/p>\n<p>sudo systemctl status httpd<\/p>\n<\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1127\" height=\"637\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-6.png\" alt=\"sudo systemctl enable httpd --now\" class=\"wp-image-16700\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-6.png 1127w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-6-300x170.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-6-1024x579.png 1024w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-6-768x434.png 768w\" sizes=\"(max-width: 1127px) 100vw, 1127px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>Check to see if Apache is listening on port 80:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\n<p>ss -tlnp | grep :80<\/p>\n<\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1127\" height=\"133\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-7.png\" alt=\"ss -tlnp | grep :80\" class=\"wp-image-16701\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-7.png 1127w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-7-300x35.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-7-1024x121.png 1024w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-7-768x91.png 768w\" sizes=\"(max-width: 1127px) 100vw, 1127px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a id=\"post-16694-_k84gqgdftmr1\"><\/a><strong>Step 3: Install MariaDB (If Not Already Installed)<\/strong><\/h3>\n\n\n\n<p><a href=\"https:\/\/greenwebpage.com\/community\/how-to-install-mariadb-on-ubuntu-24-04\/\">Install and secure MariaDB<\/a> on your AlmaLinux 10 server if you haven&#8217;t done so yet:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\n<p>sudo dnf install mariadb-server mariadb -y<\/p>\n<p>sudo systemctl enable mariadb &#8211;now<\/p>\n<p>sudo mysql_secure_installation<\/p>\n<\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1124\" height=\"484\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-8.png\" alt=\"sudo mysql_secure_installation\" class=\"wp-image-16702\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-8.png 1124w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-8-300x129.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-8-1024x441.png 1024w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-8-768x331.png 768w\" sizes=\"(max-width: 1124px) 100vw, 1124px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>Check if MariaDB is running:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\n<p>mariadb &#8211;version<\/p>\n<\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1131\" height=\"156\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-9.png\" alt=\"mariadb --version\" class=\"wp-image-16703\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-9.png 1131w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-9-300x41.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-9-1024x141.png 1024w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-9-768x106.png 768w\" sizes=\"(max-width: 1131px) 100vw, 1131px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>To get more details about the MariaDB installation and all the hardening, please read our companion article on how to secure MariaDB on AlmaLinux 10.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a id=\"post-16694-_8dlx38bbidz2\"><\/a><strong>Step 4: Install phpMyAdmin on AlmaLinux 10<\/strong><\/h3>\n\n\n\n<p>On AlmaLinux 10, you can <a href=\"https:\/\/greenwebpage.com\/community\/how-to-install-phpmyadmin-on-centos-10\/\">install phpMyAdmin<\/a> from the EPEL repository. Install it with:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\n<p>sudo dnf install phpmyadmin -y<\/p>\n<\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1131\" height=\"512\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-10.png\" alt=\"sudo dnf install phpmyadmin -y\" class=\"wp-image-16704\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-10.png 1131w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-10-300x136.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-10-1024x464.png 1024w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-10-768x348.png 768w\" sizes=\"(max-width: 1131px) 100vw, 1131px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>Check the version of phpMyAdmin that has been installed:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\n<p>dnf info phpMyAdmin<\/p>\n<\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1120\" height=\"604\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-11.png\" alt=\"dnf info phpMyAdmin\" class=\"wp-image-16705\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-11.png 1120w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-11-300x162.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-11-1024x552.png 1024w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-11-768x414.png 768w\" sizes=\"(max-width: 1120px) 100vw, 1120px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>See if phpMyAdmin is installed in the install directory:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1141\" height=\"758\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-12.png\" alt=\"phpMyAdmin dashboard\" class=\"wp-image-16706\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-12.png 1141w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-12-300x199.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-12-1024x680.png 1024w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-12-768x510.png 768w\" sizes=\"(max-width: 1141px) 100vw, 1141px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a id=\"post-16694-_ph56otcz6vsi\"><\/a><strong>Step 5: Review the Default Apache Configuration<\/strong><\/h3>\n\n\n\n<p>Allow the default config for a short time period only to see if phpMyAdmin can be accessed before hardening it:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\n<p>sudo ln -sf \/etc\/phpmyadmin\/apache.conf \/etc\/httpd\/conf.d\/phpmyadmin.conf<\/p>\n<p>sudo systemctl reload httpd<\/p>\n<\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1132\" height=\"193\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-13.png\" alt=\"sudo ln -sf \/etc\/phpmyadmin\/apache.conf \/etc\/httpd\/conf.d \/phpmyadmin.conf\" class=\"wp-image-16707\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-13.png 1132w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-13-300x51.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-13-1024x175.png 1024w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-13-768x131.png 768w\" sizes=\"(max-width: 1132px) 100vw, 1132px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>Test access:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\n<p>curl -s -o \/dev\/null -w &#8220;%{http_code}&#8221; http:\/\/localhost\/phpmyadmin\/<\/p>\n<\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1129\" height=\"139\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-14.png\" alt=\"curl -s -o \/dev\/null -w &quot;%{http_code}&quot; http:\/\/localhost\/phpmyadmin\/\" class=\"wp-image-16708\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-14.png 1129w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-14-300x37.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-14-1024x126.png 1024w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-14-768x95.png 768w\" sizes=\"(max-width: 1129px) 100vw, 1129px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>As we have just established that phpMyAdmin works, we will now completely secure it.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a id=\"post-16694-_fp0yrpm04vh1\"><\/a><strong>Step 6: Change the Default URL Alias (Security Layer 1)<\/strong><\/h3>\n\n\n\n<p>The quickest return on investment for security is the ability to change the well-known phpMyAdmin URL to something random. This one change prevents almost all <a href=\"https:\/\/greenwebpage.com\/community\/how-to-optimize-a-linux-server-for-maximum-performance-in-2026\/\">automated scanning bots<\/a>, as they only scan standard paths.<\/p>\n\n\n\n<p>Make a new Apache configuration file that is hardened:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\n<p>sudo nano \/etc\/httpd\/conf.d\/phpmyadmin-secure.conf<\/p>\n<\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<p>Include the following configuration, changing \/dbadmin_secure with your own random path:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\n<p># Custom URL alias \u2014 unpredictable path replaces \/phpmyadmin<\/p>\n<p>Alias \/dbadmin_secure \/usr\/share\/phpmyadmin<\/p>\n<p>&lt;Directory \/usr\/share\/phpmyadmin&gt;<\/p>\n<p>Options SymLinksIfOwnerMatch<\/p>\n<p>DirectoryIndex index.php<\/p>\n<p>AllowOverride All<\/p>\n<p># PHP 8+ settings<\/p>\n<p>&lt;IfModule mod_php.c&gt;<\/p>\n<p>php_admin_value upload_tmp_dir \/var\/lib\/phpmyadmin\/tmp<\/p>\n<p>php_admin_value open_basedir \/usr\/share\/phpmyadmin\/:\/usr\/share\/doc\/phpmyadmin\/:\/etc\/phpmyadmin\/:\/var\/lib\/phpmyadmin\/:\/usr\/share\/php\/:\/usr\/share\/javascript\/<\/p>\n<p>&lt;\/IfModule&gt;<\/p>\n<p># HTTP Basic Authentication (configured in Step 7)<\/p>\n<p>AuthType Basic<\/p>\n<p>AuthName &#8220;Restricted Database Administration&#8221;<\/p>\n<p>AuthUserFile \/etc\/httpd\/.htpasswd-phpmyadmin<\/p>\n<p>Require valid-user<\/p>\n<p># IP Restriction \u2014 uncomment and set your admin IP<\/p>\n<p># Require ip 192.168.1.100<\/p>\n<p>&lt;\/Directory&gt;<\/p>\n<p># Block access to sensitive directories absolutely<\/p>\n<p>&lt;Directory \/usr\/share\/phpmyadmin\/templates&gt;<\/p>\n<p>Require all denied<\/p>\n<p>&lt;\/Directory&gt;<\/p>\n<p>&lt;Directory \/usr\/share\/phpmyadmin\/libraries&gt;<\/p>\n<p>Require all denied<\/p>\n<p>&lt;\/Directory&gt;<\/p>\n<p>&lt;Directory \/usr\/share\/phpmyadmin\/setup&gt;<\/p>\n<p>Require all denied<\/p>\n<p>&lt;\/Directory&gt;<\/p>\n<\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1131\" height=\"579\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-15.png\" alt=\"\/etc\/httpd\/conf.d\/phpmyadmin-secure.conf\" class=\"wp-image-16709\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-15.png 1131w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-15-300x154.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-15-1024x524.png 1024w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-15-768x393.png 768w\" sizes=\"(max-width: 1131px) 100vw, 1131px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>Remove the default path to phpMyAdmin:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\n<p>sudo rm -f \/etc\/httpd\/conf.d\/phpmyadmin.conf<\/p>\n<\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1120\" height=\"92\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-16.png\" alt=\"sudo rm -f \/etc\/httpd\/conf.d\/phpmyadmin.conf\" class=\"wp-image-16710\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-16.png 1120w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-16-300x25.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-16-1024x84.png 1024w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-16-768x63.png 768w\" sizes=\"(max-width: 1120px) 100vw, 1120px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>Enable the following Apache modules and then restart it:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\n<p>sudo systemctl reload httpd<\/p>\n<\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1136\" height=\"123\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-17.png\" alt=\"sudo systemctl reload httpd\" class=\"wp-image-16711\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-17.png 1136w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-17-300x32.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-17-1024x111.png 1024w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-17-768x83.png 768w\" sizes=\"(max-width: 1136px) 100vw, 1136px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a id=\"post-16694-_poaon5ys0cn5\"><\/a><strong>Step 7: Add HTTP Basic Authentication (Security Layer 2)<\/strong><\/h3>\n\n\n\n<p>HTTP Basic Authentication displays another login dialog before the normal phpMyAdmin login screen, giving the user a second chance to log in, even if your custom URL is discovered by brute force bots.<\/p>\n\n\n\n<p>Install the package httpd-tools that contains the htpasswd command:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\n<p>sudo dnf install httpd-tools -y<\/p>\n<\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1127\" height=\"255\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-18.png\" alt=\"sudo dnf install httpd-tools -y\" class=\"wp-image-16712\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-18.png 1127w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-18-300x68.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-18-1024x232.png 1024w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-18-768x174.png 768w\" sizes=\"(max-width: 1127px) 100vw, 1127px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>Use your admin username to create the password file:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\n<p>sudo htpasswd -c \/etc\/httpd\/.htpasswd-phpmyadmin dbadmin<\/p>\n<\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1134\" height=\"193\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-19.png\" alt=\"sudo htpasswd -c \/etc\/httpd\/ .htpasswd-phpmyadmin dbadmin\" class=\"wp-image-16713\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-19.png 1134w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-19-300x51.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-19-1024x174.png 1024w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-19-768x131.png 768w\" sizes=\"(max-width: 1134px) 100vw, 1134px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>You will be asked for a password and then confirm it. Use a strong, unique password different from your database password.<\/p>\n\n\n\n<p>Check if the password file has been properly created:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\n<p>cat \/etc\/httpd\/.htpasswd-phpmyadmin<\/p>\n<p>ls -la \/etc\/httpd\/.htpasswd-phpmyadmin<\/p>\n<\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1120\" height=\"228\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-20.png\" alt=\"cat \/etc\/httpd\/.htpasswd-phpmyadmin\" class=\"wp-image-16714\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-20.png 1120w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-20-300x61.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-20-1024x208.png 1024w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-20-768x156.png 768w\" sizes=\"(max-width: 1120px) 100vw, 1120px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>The password is not stored anywhere on the server, as the plain-text password &#8220;Str0ngAdminP@ss!&#8221; is not stored, but rather the hash of it is.<\/p>\n\n\n\n<p>To use the authentication, reload Apache:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\n<p>sudo systemctl reload httpd<\/p>\n<\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1126\" height=\"92\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-21.png\" alt=\"sudo systemctl reload httpd\" class=\"wp-image-16715\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-21.png 1126w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-21-300x25.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-21-1024x84.png 1024w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-21-768x63.png 768w\" sizes=\"(max-width: 1126px) 100vw, 1126px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a id=\"post-16694-_lv9mb6p95hhx\"><\/a><strong>Step 8: Test All Three URL Security Scenarios<\/strong><\/h3>\n\n\n\n<p>Test three different access scenarios using the security layers to ensure that they are functioning properly:<\/p>\n\n\n\n<p>A successful test should return 200 (access granted) when a new custom URL is used with the correct credentials.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\n<p>curl -s -o \/dev\/null -w &#8220;%{http_code}&#8221; http:\/\/localhost\/phpmyadmin\/<\/p>\n<\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1131\" height=\"124\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-22.png\" alt=\"curl -s -o \/dev\/null -w &quot;%{http_code}&quot; http:\/\/localhost\/phpmyadmin\" class=\"wp-image-16716\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-22.png 1131w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-22-300x33.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-22-1024x112.png 1024w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-22-768x84.png 768w\" sizes=\"(max-width: 1131px) 100vw, 1131px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>Set up a new custom URL without credentials and ensure that it returns 403 (auth required).<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\n<p>curl -s -o \/dev\/null -w &#8220;%{http_code}&#8221; http:\/\/localhost\/dbadmin_secure\/<\/p>\n<\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1127\" height=\"95\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-23.png\" alt=\"curl -s -o \/dev\/null -w &quot;%{http_code}&quot; http:\/\/localhost\/dbadmin_secure\" class=\"wp-image-16717\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-23.png 1127w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-23-300x25.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-23-1024x86.png 1024w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-23-768x65.png 768w\" sizes=\"(max-width: 1127px) 100vw, 1127px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>Test 3 should return 403 (auth required) if a new custom URL is used with the correct credentials.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\n<p>curl -s -o \/dev\/null -w &#8220;%{http_code}&#8221; \\<\/p>\n<p>-u dbadmin:&#8217;Str0ngAdminP@ss!&#8217; http:\/\/localhost\/dbadmin_secure\/<\/p>\n<\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1125\" height=\"130\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-24.png\" alt=\"curl -s -o \/dev\/null -w &quot;%{http_code}&quot; \\ -u dbadmin: 'Str0ngAdminP@ss!' http:\/\/localhost\/dbadmin_secure\/\" class=\"wp-image-16718\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-24.png 1125w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-24-300x35.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-24-1024x118.png 1024w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/word-image-16694-24-768x89.png 768w\" sizes=\"(max-width: 1125px) 100vw, 1125px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>All three results show that the URL change and HTTP Basic authentication are all happening as expected, the old attack surface is removed, and the new one requires proper credentials to access.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><a id=\"post-16694-_lyepyb4qpwbq\"><\/a><strong>Troubleshooting Common Issues on AlmaLinux 10<\/strong><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>HTTP 403 Forbidden after modifying URL alias: <\/strong>This indicates that your AllowOverride All directive isn&#8217;t included in the configuration of your <a href=\"https:\/\/greenwebpage.com\/community\/how-to-install-apache-on-debian-12\/\">Apache web server<\/a>, and so .htaccess files are not being processed. Make sure that AllowOverride All is there within the &lt;Directory \/usr\/share\/phpmyadmin> section of your configuration file, and restart Apache.<\/li>\n\n\n\n<li><strong>Correct credentials, but still gets HTTP 401<\/strong>: This typically happens because the AuthUserFile path in your Apache configuration file is not the same as the .htpasswd username and password file. Check the path against the AuthUserFile directive: ls -la \/etc\/httpd\/.htpasswd-phpmyadmin.<\/li>\n\n\n\n<li><strong>phpMyAdmin shows &#8220;The blowfish_secret is too short&#8221; warning: <\/strong>Generate a new 32-character secret with python3 -c &#8220;import secrets; print(secrets.token_hex(32))&#8221; and update the value in \/var\/lib\/phpmyadmin\/blowfish_secret.inc.php.<\/li>\n\n\n\n<li><strong>&#8220;Cannot connect: invalid settings&#8221; after login<\/strong>: This means phpMyAdmin cannot reach MariaDB. Verify MariaDB is running with systemctl status mariadb, confirm the socket path in \/etc\/phpmyadmin\/config.inc.php matches ss -lx | grep mysql, and ensure the user you are logging in with has valid MariaDB credentials.<\/li>\n\n\n\n<li><strong>Security headers not appearing in curl output: <\/strong>Confirm that mod_headers is enabled with httpd -M | grep headers_module. If it is not listed, enable it with a2enmod headers (on systems using a2enmod) or by adding LoadModule headers_module modules\/mod_headers.so to your Apache configuration, then restart Apache.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><a id=\"post-16694-_odtc71gye7j\"><\/a><strong>Conclusion<\/strong><\/h2>\n\n\n\n<p>Installing and securing phpMyAdmin on AlmaLinux 10 requires installing the full LAMP stack with sudo dnf install httpd php php-mbstring php-mysqlnd phpmyadmin -y, then immediately hardening it by renaming the default \/phpmyadmin URL to an unpredictable custom alias, adding HTTP Basic Authentication with htpasswd, and applying security headers including X-Frame-Options: DENY and Content-Security-Policy to block clickjacking and script injection attacks.<\/p>\n\n    <div class=\"xs_social_share_widget xs_share_url after_content \t\tmain_content  wslu-style-1 wslu-share-box-shaped wslu-fill-colored wslu-none wslu-share-horizontal wslu-theme-font-no wslu-main_content\">\n\n\t\t\n        <ul>\n\t\t\t        <\/ul>\n    <\/div> \n","protected":false},"excerpt":{"rendered":"<p>phpMyAdmin is one of the most popular web-based database administration interfaces in the world, and one of the most common attack points on Linux servers. By scanning any server&#8217;s access logs, you will see bots constantly probing the server for \/phpmyadmin, \/pma, \/myadmin, and many other default phpMyAdmin paths that are known for being scanned [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":16721,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[43],"tags":[1024,233,882,318,853],"class_list":["post-16694","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials","tag-almalinux-10","tag-apache","tag-lamp","tag-php","tag-phpmyadmin"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Install phpMyAdmin and Secure It on AlmaLinux 10: A Complete Step-by-Step Guide - Greenwebpage Community<\/title>\n<meta name=\"description\" content=\"In this tutorial, you&#039;ll install phpMyAdmin with the full LAMP stack (Apache, MariaDB, PHP) on AlmaLinux 10, and apply all the essential security measures: change the default root directory, implement HTTP Basic authentication, restrict access by IP, set security headers, and tighten file permissions.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/greenwebpage.com\/community\/how-to-install-phpmyadmin-and-secure-it-on-almalinux-10\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Install phpMyAdmin and Secure It on AlmaLinux 10: A Complete Step-by-Step Guide - Greenwebpage Community\" \/>\n<meta property=\"og:description\" content=\"In this tutorial, you&#039;ll install phpMyAdmin with the full LAMP stack (Apache, MariaDB, PHP) on AlmaLinux 10, and apply all the essential security measures: change the default root directory, implement HTTP Basic authentication, restrict access by IP, set security headers, and tighten file permissions.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/greenwebpage.com\/community\/how-to-install-phpmyadmin-and-secure-it-on-almalinux-10\/\" \/>\n<meta property=\"og:site_name\" content=\"Greenwebpage Community\" \/>\n<meta property=\"article:published_time\" content=\"2026-05-18T14:04:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-05-18T14:04:06+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/How-to-Install-phpMyAdmin-and-Secure-it-on-AlmaLinx-10-A-Complete-Step-by-Step-Guide.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1020\" \/>\n\t<meta property=\"og:image:height\" content=\"600\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Karim Buzdar\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Karim Buzdar\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"11 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-install-phpmyadmin-and-secure-it-on-almalinux-10\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-install-phpmyadmin-and-secure-it-on-almalinux-10\/\"},\"author\":{\"name\":\"Karim Buzdar\",\"@id\":\"https:\/\/greenwebpage.com\/community\/#\/schema\/person\/467c100c1d017bc081473ee0440680c8\"},\"headline\":\"How to Install phpMyAdmin and Secure It on AlmaLinux 10: A Complete Step-by-Step Guide\",\"datePublished\":\"2026-05-18T14:04:00+00:00\",\"dateModified\":\"2026-05-18T14:04:06+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-install-phpmyadmin-and-secure-it-on-almalinux-10\/\"},\"wordCount\":1506,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/#organization\"},\"image\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-install-phpmyadmin-and-secure-it-on-almalinux-10\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/How-to-Install-phpMyAdmin-and-Secure-it-on-AlmaLinx-10-A-Complete-Step-by-Step-Guide.jpg\",\"keywords\":[\"AlmaLinux 10\",\"Apache\",\"LAMP\",\"PHP\",\"phpMyAdmin\"],\"articleSection\":[\"Tutorials\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/greenwebpage.com\/community\/how-to-install-phpmyadmin-and-secure-it-on-almalinux-10\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-install-phpmyadmin-and-secure-it-on-almalinux-10\/\",\"url\":\"https:\/\/greenwebpage.com\/community\/how-to-install-phpmyadmin-and-secure-it-on-almalinux-10\/\",\"name\":\"How to Install phpMyAdmin and Secure It on AlmaLinux 10: A Complete Step-by-Step Guide - Greenwebpage Community\",\"isPartOf\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-install-phpmyadmin-and-secure-it-on-almalinux-10\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-install-phpmyadmin-and-secure-it-on-almalinux-10\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/How-to-Install-phpMyAdmin-and-Secure-it-on-AlmaLinx-10-A-Complete-Step-by-Step-Guide.jpg\",\"datePublished\":\"2026-05-18T14:04:00+00:00\",\"dateModified\":\"2026-05-18T14:04:06+00:00\",\"description\":\"In this tutorial, you'll install phpMyAdmin with the full LAMP stack (Apache, MariaDB, PHP) on AlmaLinux 10, and apply all the essential security measures: change the default root directory, implement HTTP Basic authentication, restrict access by IP, set security headers, and tighten file permissions.\",\"breadcrumb\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-install-phpmyadmin-and-secure-it-on-almalinux-10\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/greenwebpage.com\/community\/how-to-install-phpmyadmin-and-secure-it-on-almalinux-10\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-install-phpmyadmin-and-secure-it-on-almalinux-10\/#primaryimage\",\"url\":\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/How-to-Install-phpMyAdmin-and-Secure-it-on-AlmaLinx-10-A-Complete-Step-by-Step-Guide.jpg\",\"contentUrl\":\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/How-to-Install-phpMyAdmin-and-Secure-it-on-AlmaLinx-10-A-Complete-Step-by-Step-Guide.jpg\",\"width\":1020,\"height\":600,\"caption\":\"How to Install phpMyAdmin and Secure it on AlmaLinx 10 A Complete Step-by-Step-Guide\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-install-phpmyadmin-and-secure-it-on-almalinux-10\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/greenwebpage.com\/community\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Install phpMyAdmin and Secure It on AlmaLinux 10: A Complete Step-by-Step Guide\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/greenwebpage.com\/community\/#website\",\"url\":\"https:\/\/greenwebpage.com\/community\/\",\"name\":\"Greenwebpage Community\",\"description\":\"Get online in three steps with our wide range of web hosting solutions. Choose from professional business to enterprise options designed to meet your needs.\",\"publisher\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/greenwebpage.com\/community\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/greenwebpage.com\/community\/#organization\",\"name\":\"Greenwebpage Community\",\"url\":\"https:\/\/greenwebpage.com\/community\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/greenwebpage.com\/community\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/10\/cropped-logomic.png\",\"contentUrl\":\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/10\/cropped-logomic.png\",\"width\":512,\"height\":512,\"caption\":\"Greenwebpage Community\"},\"image\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/greenwebpage.com\/community\/#\/schema\/person\/467c100c1d017bc081473ee0440680c8\",\"name\":\"Karim Buzdar\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/greenwebpage.com\/community\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/0628fcbcddd9bc5486245d2cf4a904dbcdeac9ad6c3098f49237094e9d513d0c?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/0628fcbcddd9bc5486245d2cf4a904dbcdeac9ad6c3098f49237094e9d513d0c?s=96&d=mm&r=g\",\"caption\":\"Karim Buzdar\"},\"sameAs\":[\"https:\/\/greenwebpage.com\"],\"url\":\"https:\/\/greenwebpage.com\/community\/author\/karim\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Install phpMyAdmin and Secure It on AlmaLinux 10: A Complete Step-by-Step Guide - Greenwebpage Community","description":"In this tutorial, you'll install phpMyAdmin with the full LAMP stack (Apache, MariaDB, PHP) on AlmaLinux 10, and apply all the essential security measures: change the default root directory, implement HTTP Basic authentication, restrict access by IP, set security headers, and tighten file permissions.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/greenwebpage.com\/community\/how-to-install-phpmyadmin-and-secure-it-on-almalinux-10\/","og_locale":"en_US","og_type":"article","og_title":"How to Install phpMyAdmin and Secure It on AlmaLinux 10: A Complete Step-by-Step Guide - Greenwebpage Community","og_description":"In this tutorial, you'll install phpMyAdmin with the full LAMP stack (Apache, MariaDB, PHP) on AlmaLinux 10, and apply all the essential security measures: change the default root directory, implement HTTP Basic authentication, restrict access by IP, set security headers, and tighten file permissions.","og_url":"https:\/\/greenwebpage.com\/community\/how-to-install-phpmyadmin-and-secure-it-on-almalinux-10\/","og_site_name":"Greenwebpage Community","article_published_time":"2026-05-18T14:04:00+00:00","article_modified_time":"2026-05-18T14:04:06+00:00","og_image":[{"width":1020,"height":600,"url":"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/How-to-Install-phpMyAdmin-and-Secure-it-on-AlmaLinx-10-A-Complete-Step-by-Step-Guide.jpg","type":"image\/jpeg"}],"author":"Karim Buzdar","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Karim Buzdar","Est. reading time":"11 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/greenwebpage.com\/community\/how-to-install-phpmyadmin-and-secure-it-on-almalinux-10\/#article","isPartOf":{"@id":"https:\/\/greenwebpage.com\/community\/how-to-install-phpmyadmin-and-secure-it-on-almalinux-10\/"},"author":{"name":"Karim Buzdar","@id":"https:\/\/greenwebpage.com\/community\/#\/schema\/person\/467c100c1d017bc081473ee0440680c8"},"headline":"How to Install phpMyAdmin and Secure It on AlmaLinux 10: A Complete Step-by-Step Guide","datePublished":"2026-05-18T14:04:00+00:00","dateModified":"2026-05-18T14:04:06+00:00","mainEntityOfPage":{"@id":"https:\/\/greenwebpage.com\/community\/how-to-install-phpmyadmin-and-secure-it-on-almalinux-10\/"},"wordCount":1506,"commentCount":0,"publisher":{"@id":"https:\/\/greenwebpage.com\/community\/#organization"},"image":{"@id":"https:\/\/greenwebpage.com\/community\/how-to-install-phpmyadmin-and-secure-it-on-almalinux-10\/#primaryimage"},"thumbnailUrl":"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/How-to-Install-phpMyAdmin-and-Secure-it-on-AlmaLinx-10-A-Complete-Step-by-Step-Guide.jpg","keywords":["AlmaLinux 10","Apache","LAMP","PHP","phpMyAdmin"],"articleSection":["Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/greenwebpage.com\/community\/how-to-install-phpmyadmin-and-secure-it-on-almalinux-10\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/greenwebpage.com\/community\/how-to-install-phpmyadmin-and-secure-it-on-almalinux-10\/","url":"https:\/\/greenwebpage.com\/community\/how-to-install-phpmyadmin-and-secure-it-on-almalinux-10\/","name":"How to Install phpMyAdmin and Secure It on AlmaLinux 10: A Complete Step-by-Step Guide - Greenwebpage Community","isPartOf":{"@id":"https:\/\/greenwebpage.com\/community\/#website"},"primaryImageOfPage":{"@id":"https:\/\/greenwebpage.com\/community\/how-to-install-phpmyadmin-and-secure-it-on-almalinux-10\/#primaryimage"},"image":{"@id":"https:\/\/greenwebpage.com\/community\/how-to-install-phpmyadmin-and-secure-it-on-almalinux-10\/#primaryimage"},"thumbnailUrl":"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/How-to-Install-phpMyAdmin-and-Secure-it-on-AlmaLinx-10-A-Complete-Step-by-Step-Guide.jpg","datePublished":"2026-05-18T14:04:00+00:00","dateModified":"2026-05-18T14:04:06+00:00","description":"In this tutorial, you'll install phpMyAdmin with the full LAMP stack (Apache, MariaDB, PHP) on AlmaLinux 10, and apply all the essential security measures: change the default root directory, implement HTTP Basic authentication, restrict access by IP, set security headers, and tighten file permissions.","breadcrumb":{"@id":"https:\/\/greenwebpage.com\/community\/how-to-install-phpmyadmin-and-secure-it-on-almalinux-10\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/greenwebpage.com\/community\/how-to-install-phpmyadmin-and-secure-it-on-almalinux-10\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/greenwebpage.com\/community\/how-to-install-phpmyadmin-and-secure-it-on-almalinux-10\/#primaryimage","url":"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/How-to-Install-phpMyAdmin-and-Secure-it-on-AlmaLinx-10-A-Complete-Step-by-Step-Guide.jpg","contentUrl":"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2026\/05\/How-to-Install-phpMyAdmin-and-Secure-it-on-AlmaLinx-10-A-Complete-Step-by-Step-Guide.jpg","width":1020,"height":600,"caption":"How to Install phpMyAdmin and Secure it on AlmaLinx 10 A Complete Step-by-Step-Guide"},{"@type":"BreadcrumbList","@id":"https:\/\/greenwebpage.com\/community\/how-to-install-phpmyadmin-and-secure-it-on-almalinux-10\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/greenwebpage.com\/community\/"},{"@type":"ListItem","position":2,"name":"How to Install phpMyAdmin and Secure It on AlmaLinux 10: A Complete Step-by-Step Guide"}]},{"@type":"WebSite","@id":"https:\/\/greenwebpage.com\/community\/#website","url":"https:\/\/greenwebpage.com\/community\/","name":"Greenwebpage Community","description":"Get online in three steps with our wide range of web hosting solutions. Choose from professional business to enterprise options designed to meet your needs.","publisher":{"@id":"https:\/\/greenwebpage.com\/community\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/greenwebpage.com\/community\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/greenwebpage.com\/community\/#organization","name":"Greenwebpage Community","url":"https:\/\/greenwebpage.com\/community\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/greenwebpage.com\/community\/#\/schema\/logo\/image\/","url":"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/10\/cropped-logomic.png","contentUrl":"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/10\/cropped-logomic.png","width":512,"height":512,"caption":"Greenwebpage Community"},"image":{"@id":"https:\/\/greenwebpage.com\/community\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/greenwebpage.com\/community\/#\/schema\/person\/467c100c1d017bc081473ee0440680c8","name":"Karim Buzdar","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/greenwebpage.com\/community\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/0628fcbcddd9bc5486245d2cf4a904dbcdeac9ad6c3098f49237094e9d513d0c?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/0628fcbcddd9bc5486245d2cf4a904dbcdeac9ad6c3098f49237094e9d513d0c?s=96&d=mm&r=g","caption":"Karim Buzdar"},"sameAs":["https:\/\/greenwebpage.com"],"url":"https:\/\/greenwebpage.com\/community\/author\/karim\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/posts\/16694","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/comments?post=16694"}],"version-history":[{"count":2,"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/posts\/16694\/revisions"}],"predecessor-version":[{"id":16720,"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/posts\/16694\/revisions\/16720"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/media\/16721"}],"wp:attachment":[{"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/media?parent=16694"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/categories?post=16694"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/tags?post=16694"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}