更改 documentroot 后,xampp 仍然使用默认的 phpmyadmin

2022-01-05 00:00:00 xampp php apache phpmyadmin

我使用 XAMPP 来安装 Apache、PHP、MySQL.

I used XAMPP to install Apache, PHP, MySQL.

然后我个性化了 c:xamppapacheconfhttpd.conf 文件:

I then personalized the c:xamppapacheconfhttpd.conf file thusly:

# DocumentRoot "C:/xampp/htdocs"
DocumentRoot "C:UsersedwardDocumentswebs"

# <Directory "C:/xampp/htdocs">
<Directory "C:UsersedwardDocumentswebs">

我现在可以放置网站,例如这里:

I now can put websites e.g. here:

C:UsersedwardDocumentswebs	est

这里是哪个地图:

http://localhost/test/

但是,当复制到我自己的 phpmyadmin 站点时:

However, when copied in my own phpmyadmin site here:

C:UsersedwardDocumentswebsphpmyadmin

我注意到网址:

http://localhost/phpmyadmin

仍然指向:

C:xamppphpMyAdmin

这是在哪里设置的以及如何更改它以便 URL http://localhost/phpmyadmin 映射到 C:UsersedwardDocumentswebsphpmyadmin?

Where is this being set and how can I change it so that the URL http://localhost/phpmyadmin maps to C:UsersedwardDocumentswebsphpmyadmin?

推荐答案

这是因为 xampp 使用 aliashttp://localhost/phpmyadmin 指向 xampp的phpmyadmin路径

It's because xampp uses an alias for pointing http://localhost/phpmyadmin to xampp's phpmyadmin path

所以你可以做的是,在你的 httpd.conf 中找到 Alias/phpmyadmin 并将其替换为 Alias/xphpmyadmin 甚至 <代码>别名/phpmyadmin2.如果这样做,您将不会与 webs 文件夹中的 phpmyadmin 文件夹发生冲突.

So what you can do is, find Alias /phpmyadmin in your httpd.conf and replace it with Alias /xphpmyadmin or even Alias /phpmyadmin2. If you do this, you will not have conflict with having a phpmyadmin folder in your webs folder.

相关文章