Score:1

nginx does not find phpMyAdmin

cn flag

nginx is searching for phpMyAdmin in the wrong location

my nginx config:


server {
        listen 80;
        listen [::]:80;

        access_log /var/log/nginx/reverse-access.log;
        error_log /var/log/nginx/reverse-error.log;

        root /var/www/MY_DOMAIN/html;
        index index.html index.html index.php;
        server_name MY_DOMAIN www.MY_DOMAIN.com;

        location / {
        try_files $uri $uri/ =404;
    }

    location ~ \.php$ {
        include snippets/fastcgi-php.conf;
        fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
     }

    location ~ /\.ht {
        deny all;
    }

        location /APP_LOCATION {
         proxy_pass http://localhost:3000;
         proxy_http_version 1.1;
         proxy_set_header Upgrade $http_upgrade;
         proxy_set_header Connection 'upgrade';
         proxy_set_header Host $host;
         proxy_cache_bypass $http_upgrade;
  }
}

I did a symlink from /usr/share/phpmyadmin to /var/www/MY_DOMAIN/html/phpmyadmin.

But nginx is still looking in the default location for phpMyAdmin

Error logs:

2021/08/27 13:24:41 [error] 1114474#1114474: *2 "/usr/share/nginx/html/phpmyadmin/index.html" is not found (2: No such file or directory), client: xxx.xx.x.xxx, server: , request: "GET /phpmyadmin/ HTTP/1.1", host: "MY_DOMAIN.com"

Michael Hampton avatar
cz flag
Please post the output of `nginx -T`
cn flag
What's the need with phpMyAdmin? Haven't you considered SSH tunneling from any modern MySQL GUI client? A breeze to configure and more secure compared to phpMyAdmin.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.