Multiple Subdomains to Log In To phpMyAdmin
September 15, 2023 05:09PM
I'm trying to have 2 separate subdomains from 2 different websites have access to logging into the same phpMyAdmin.

I'm not sure how to set up the phpmyadmin.conf file so that NGINX knows how to forward both subdomains to the phpmyadmin login page.

Here's what my Nginx Server Block for the phpmyadmin.conf file looks like, located at /etc/nginx/conf.d/phpmyadmin.conf

server {
listen 80;
listen [::]:80;
root /usr/share/phpmyadmin/;
index index.php index.html index.htm index.nginx-debian.html;

access_log /var/log/nginx/phpmyadmin_access.log;
error_log /var/log/nginx/phpmyadmin_error.log;

location / {
try_files $uri $uri/ /index.php;

location ~ ^/(doc|sql|setup)/ {
deny all;

location ~ \.php$ {
fastcgi_pass unix:/run/php/php7.4-fpm.sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
include snippets/fastcgi-php.conf;

location ~ /\.ht {
deny all;

So, I'm wondering how I can have both subdomain and both redirect to the main phpmyadmin log in page. Any support would be appreciated.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 318
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready