{"id":3340,"date":"2023-03-15T01:14:16","date_gmt":"2024-10-16T08:26:06","guid":{"rendered":""},"modified":"2025-02-02T00:46:20","modified_gmt":"2025-02-01T23:46:20","slug":"how-to-install-phpmyadmin-with-nginx-and-let-039-s-encrypt-ssl-on-windows-vps","status":"publish","type":"post","link":"https:\/\/netcloud24.com\/knowledgebase\/how-to-install-phpmyadmin-with-nginx-and-let-039-s-encrypt-ssl-on-windows-vps\/","title":{"rendered":"Linux VPS &#038; VPS Windows Setup Guide | NetCloud24 PhpMyAdmin with Nginx and Let&#039;s Encrypt SSL on Windows VPS"},"content":{"rendered":"<p>\u00a0<\/p>\n<\/p>\n<header><\/header>\n<section>\n<h2>Introduction<\/h2>\n<p>PhpMyAdmin is a popular web-based tool for managing MySQL and MariaDB databases. In this guide, we will walk you through the process of installing PhpMyAdmin, setting up Nginx as a web server, and securing your setup with a free SSL certificate from Let&#8217;s Encrypt on your .<\/p>\n<\/section>\n<section>\n<h2>Step 1: Install Prerequisites<\/h2>\n<p>Before installing PhpMyAdmin and Nginx, ensure that your system has the following components:<\/p>\n<ul>\n<li><strong>PHP<\/strong>: Install PHP and the necessary extensions.<\/li>\n<li><strong>MySQL or MariaDB<\/strong>: PhpMyAdmin requires a MySQL\/MariaDB database server to function.<\/li>\n<li><strong>WinNginx<\/strong>: Nginx web server for Windows VPS(or use an appropriate version for Windows).<\/li>\n<li><strong>Let&#8217;s Encrypt<\/strong>: To secure your server with an SSL certificate, we will use the Let&#8217;s Encrypt client Certbot.<\/li>\n<\/ul>\n<p>Install these components if you haven\u2019t already, using the respective guides for each.<\/p>\n<\/section>\n<section>\n<h2>Step 2: Install PhpMyAdmin<\/h2>\n<ol>\n<li>Go to the official PhpMyAdmin download page at <a href=\"https:\/\/www.phpmyadmin.net\/downloads\/\" target=\"_blank\" rel=\"follow\">here<\/a>.<\/li>\n<li>Download the latest stable version of PhpMyAdmin.<\/li>\n<li>Extract the PhpMyAdmin archive into your Nginx web server&#8217;s root directory (e.g., <code>C:\\nginx\\html\\phpmyadmin<\/code>).<\/li>\n<li>Rename the extracted folder to <code>phpmyadmin<\/code> (if it is not already named that).<\/li>\n<\/ol>\n<\/section>\n<section>\n<h2>Step 3: Configure Nginx for PhpMyAdmin<\/h2>\n<p>Now, configure Nginx to serve PhpMyAdmin:<\/p>\n<ol>\n<ol>\n<li>Navigate to the Nginx configuration directory (e.g., <code>C:\\nginx\\conf\\nginx.conf<\/code>).<\/li>\n<li>Open the <code>nginx.conf<\/code> file in a text editor and add a server block to serve PhpMyAdmin. Below is a sample configuration:<\/li>\n<\/ol>\n<\/ol>\n<pre><code>server {\r\n    listen 80;\r\n    server_name yourdomain.com;\r\n    root C:\/nginx\/html;\r\n\r\n    index index.php index.html index.htm;\r\n    location \/ {\r\n        try_files $uri $uri\/ =404;\r\n    }\r\n\r\n    location ~ ^\/phpmyadmin\/(.*\\.php)$ {\r\n        root C:\/nginx\/html\/phpmyadmin;\r\n        fastcgi_pass 127.0.0.1:9000;\r\n        fastcgi_index index.php;\r\n        fastcgi_param SCRIPT_FILENAME $document_root\/$fastcgi_script_name;\r\n        include fastcgi_params;\r\n    }\r\n\r\n    location ~ \/\\.ht {\r\n        deny all;\r\n    }\r\n}<\/code><\/pre>\n<ol>\n<ol>\n<li>Save the file and restart Nginx for the changes to take effect:<\/li>\n<\/ol>\n<\/ol>\n<pre><code>nginx -s reload<\/code><\/pre>\n<\/section>\n<section>\n<h2>Step 4: Install and Configure SSL with Let&#8217;s Encrypt<\/h2>\n<p>To secure your PhpMyAdmin installation with an SSL certificate, use Let&#8217;s Encrypt with Certbot. Follow these steps:<\/p>\n<ol>\n<ol>\n<li>Install Certbot by following the instructions at the <a href=\"https:\/\/certbot.eff.org\/instructions\" target=\"_blank\" rel=\"follow\">Certbot website<\/a>.<\/li>\n<li>Once installed, open a command prompt and run the following command to obtain an SSL certificate:<\/li>\n<\/ol>\n<\/ol>\n<pre><code>certbot certonly --standalone -d yourdomain.com<\/code><\/pre>\n<ol>\n<li>Make sure to replace <code>yourdomain.com<\/code> with your actual domain or VPS IP address.<\/li>\n<li>After successful certificate issuance, you\u2019ll have the SSL certificate files in the default directory (usually <code>C:\\Certbot\\live\\yourdomain.com<\/code>).<\/li>\n<\/ol>\n<\/section>\n<section>\n<h2>Step 5: Configure Nginx to Use SSL<\/h2>\n<p>Now, update the Nginx configuration to use the SSL certificate:<\/p>\n<ol>\n<ol>\n<li>Open your <code>nginx.conf<\/code> file again.<\/li>\n<li>Modify the server block to listen on port 443 for HTTPS and configure SSL:<\/li>\n<\/ol>\n<\/ol>\n<pre><code>server {\r\n    listen 443 ssl;\r\n    server_name yourdomain.com;\r\n\r\n    ssl_certificate C:\/Certbot\/live\/yourdomain.com\/fullchain.pem;\r\n    ssl_certificate_key C:\/Certbot\/live\/yourdomain.com\/privkey.pem;\r\n\r\n    root C:\/nginx\/html;\r\n    index index.php index.html index.htm;\r\n\r\n    location \/ {\r\n        try_files $uri $uri\/ =404;\r\n    }\r\n\r\n    location ~ ^\/phpmyadmin\/(.*\\.php)$ {\r\n        root C:\/nginx\/html\/phpmyadmin;\r\n        fastcgi_pass 127.0.0.1:9000;\r\n        fastcgi_index index.php;\r\n        fastcgi_param SCRIPT_FILENAME $document_root\/$fastcgi_script_name;\r\n        include fastcgi_params;\r\n    }\r\n\r\n    location ~ \/\\.ht {\r\n        deny all;\r\n    }\r\n}<\/code><\/pre>\n<ol>\n<ol>\n<li>Save the configuration file and restart Nginx:<\/li>\n<\/ol>\n<\/ol>\n<pre><code>nginx -s reload<\/code><\/pre>\n<\/section>\n<section>\n<h2>Step 6: Access PhpMyAdmin<\/h2>\n<p>Once you have completed all the steps, you can access PhpMyAdmin by navigating to <code>https:\/\/yourdomain.com\/phpmyadmin<\/code> in your web browser. Login using your MySQL or MariaDB credentials.<\/p>\n<\/section>\n<section>\n<h2>Step 7: Set Up Auto-Renewal for SSL Certificates<\/h2>\n<p>Let&#8217;s Encrypt certificates expire every 90 days. To automatically renew the SSL certificate, you can set up a scheduled task in Windows:<\/p>\n<ol>\n<ol>\n<li>Open Task Scheduler and create a new task.<\/li>\n<li>Set the trigger to run every 60 days.<\/li>\n<li>Set the action to run Certbot with the renewal command:<\/li>\n<\/ol>\n<\/ol>\n<pre><code>certbot renew --quiet<\/code><\/pre>\n<ol>\n<li>Ensure that the task runs with administrative privileges.<\/li>\n<\/ol>\n<\/section>\n<section>\n<h2>Conclusion<\/h2>\n<p>You have successfully installed PhpMyAdmin with Nginx and secured it with a free SSL certificate from Let&#8217;s Encrypt on your . This setup allows you to manage your databases securely over HTTPS. For further customization or advanced configurations, refer to the official documentation for PhpMyAdmin, Nginx, and Let&#8217;s Encrypt.<\/p>\n<\/section>\n<footer>\n<p>\u00a9 2024. For more Windows VPS solutions, visit <a href=\"https:\/\/ie.netcloud24.com\" target=\"_blank\" rel=\"follow\">NetCloud24<\/a>.<\/p>\n<\/footer>\n<div class=\"post-author-box\" style=\"border-top:1px solid #ddd;margin-top:20px;padding-top:15px;\">\n<p><strong>Author:<\/strong> \u0141ukasz Bodziony<\/p>\n<p><strong>Website:<\/strong> <a href=\"https:\/\/ca.netcloud24.com\" target=\"_blank\" rel=\"dofollow\">Windows VPS<\/a><\/p>\n<p><em>\u0141ukasz Bodziony is the CEO and founder of <a href=\"https:\/\/netcloud24.com\" target=\"_blank\" rel=\"dofollow\">NETCLOUD24<\/a>, a global VPS hosting brand proudly originating from Poland. With extensive experience in cloud computing, virtualization, and server management, he delivers high-performance <strong>Windows VPS<\/strong> and <strong>Remote Desktop Services (RDS)<\/strong> solutions to clients across Europe, North America, and beyond.<\/em><\/p>\n<p><em>His expertise covers a wide range of technologies, including <strong>Microsoft Azure<\/strong>, <strong>Proxmox VE<\/strong>, <strong>Amazon Web Services (AWS)<\/strong>, and numerous other virtualization and cloud platforms.<\/em><\/p>\n<p><em>Beyond running his hosting business, \u0141ukasz also provides <strong>professional paid server configuration and optimization services<\/strong> for companies and individuals. Outside of work, he is dedicated to caring for his children and building a secure future for them.<\/em><\/p>\n<p><em>If you are interested in working with him or need expert assistance with your hosting, cloud environment, or server setup, feel free to reach out via <a href=\"https:\/\/ca.netcloud24.com\" target=\"_blank\" rel=\"dofollow\">Windows VPS<\/a>.<\/em><\/p>\n<\/p><\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u00a0 Introduction PhpMyAdmin is a popular web-based tool for managing MySQL and MariaDB databases. In this guide, we will walk you through the process of installing PhpMyAdmin, setting\u2026<\/p>\n","protected":false},"author":1,"featured_media":3421,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_seopress_robots_primary_cat":"","_seopress_titles_title":"","_seopress_titles_desc":"","_seopress_robots_index":"","footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[],"tags":[14,12,11,23,20,21,22,17,7,8,6,10,18,19,15,24,16,5,13,9],"class_list":["post-3340","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","tag-cheapvps","tag-cloudvps","tag-hostingvps","tag-rds","tag-rdscal","tag-remotedesktop","tag-remotedesktopvps","tag-servervps","tag-ukvps","tag-virtualserver","tag-vpshosting","tag-vpsserver","tag-vpssolutions","tag-vpswindows","tag-vpswithwindows","tag-windowsrds","tag-windowsserver","tag-windowsvps","tag-windowsvpshosting","tag-windowsvpsuk"],"jetpack_publicize_connections":[],"_links":{"self":[{"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/3340","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/comments?post=3340"}],"version-history":[{"count":0,"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/3340\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/media\/3421"}],"wp:attachment":[{"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/media?parent=3340"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/categories?post=3340"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/tags?post=3340"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}