after changing documentroot, xampp still using default phpmyadmin

匿名 (未验证) 提交于 2019-12-03 02:29:01

问题:

I used XAMPP to install Apache, PHP, MySQL.

I then personalized the c:\xampp\apache\conf\httpd.conf file thusly:

# DocumentRoot "C:/xampp/htdocs" DocumentRoot "C:\Users\edward\Documents\webs"  # <Directory "C:/xampp/htdocs"> <Directory "C:\Users\edward\Documents\webs"> 

I now can put websites e.g. here:

C:\Users\edward\Documents\webs\test 

which map here:

http://localhost/test/ 

However, when copied in my own phpmyadmin site here:

C:\Users\edward\Documents\webs\phpmyadmin 

I noticed that the URL:

http://localhost/phpmyadmin 

still points to:

C:\xampp\phpMyAdmin 

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

回答1:

This may help others You will find the lines in your httpd.conf file

# XAMPP specific settings
Include "conf/extra/httpd-xampp.conf"

If you look in the included file "httpd-xampp.conf" you will see the line

Alias /phpmyadmin "C:/xampp/phpMyAdmin/" <Directory "C:/xampp/phpMyAdmin">     AllowOverride AuthConfig     Require all granted </Directory> 

Modifying this information in any number of ways (change httpd-xampp.conf, include your own custom conf file, placing a statement after the above statements) should solve your problem



回答2:

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

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.



标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!