0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Nginx で phpMyAdmin の URLを変更する方法

Posted at

Nginx で動いているサーバーで、

https://example.com/phpmyadmin
で phpMyAdmin にアクセスできる時に、
https://example.com/secret
で phpMyAdmin にアクセスできるようにする方法です。

https://example.com/phpmyadmin の設定ファイル

        location  ^~ /phpmyadmin {
                root /usr/share;
                index index.html index.htm index.php;

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

https://example.com/secret の設定ファイル

        location /secret {
                alias /usr/share/phpmyadmin;
                index index.html index.htm index.php;

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

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?