#systemctlrestartapache2更改PhpMyAdmin登录页在Nginx的网络服务器
优采云 发布时间: 2021-05-02 04:52#systemctlrestartapache2更改PhpMyAdmin登录页在Nginx的网络服务器
------------在Debian和Ubuntu上------------
#/etc/phpmyadmin/apache.conf
然后添加一个新的代码,如下所示:#别名/ phpmyadmin / usr / share / phpmyadmin
别名/ my / usr / share / phpmyadmin
PhpMyAdmin更改别名
以上内容使我们能够通过phpMyAdmin界面进行访问。如果要使用其他URL,则可以随意更改上面的别名。
在同一文件中时,请确保要求所有授权命令在目录中收录/ usr / share / phpmyadmin块。
PhpMyAdmin允许访问
此外,确保Apache读取Debian / Ubuntu phpMyAdmin的配置:------------在Debian和Ubuntu上------------
#echo“ Include /etc/phpmyadmin/apache.conf” >> / etc / apache2 / apache 2. conf
最后,重新启动Apache以应用更改并将浏览器指向。 ------------在CentOS / RHEL和Fedora上------------
#systemctl重新启动httpd
------------在Debian和Ubuntu上------------
#systemctl重新启动apache2
在Nginx中更改PhpMyAdmin的登录页面
在Nginx Web服务器上,我们只需输入以下命令即可创建phpMyAdmin安装文件到Nginx文档根目录(例如/ usr / share / nginx / html)的符号链接:#ln -s / usr / share / phpMyAdmin / usr / share / nginx / html
OR
#ln -s / usr / share / phpmyadmin / usr / share / nginx / html
现在我们需要更改phpMyAdmin页面的URL,我们只需要按如下方式重命名符号链接:#cd / usr / share / nginx / html
#mv phpmyadmin my
OR
#mv phpMyAdmin我的
在Nginx中更改PhpMyAdmin URL
最后,重新启动Nginx和PHP-FPM以应用更改并将浏览器指向。 ------------在CentOS / RHEL和Fedora上------------
#systemctl重新启动nginx
#systemctl重新启动php-fpm
------------在Debian和Ubuntu上------------
#systemctl重新启动nginx
#systemctl重新启动php5-fpm
它应该打开phpMyAdmin界面(下图所示),这将导致未找到错误页面。
保护PhpMyAdmin登录页面
请勿使用数据库根用户的凭据登录。您不希望这些凭据经过纯文本链接的过程,因此在下一个文章中,我们将说明如何设置为自签名证书登录页面,例如phpMyAdmin。