I'm trying to install phpmyadmin on my new server, following this guide
我正在尝试按照本指南在我的新服务器上安装phpmyadmin
apt-get install phpmyadmin
nano /etc/apache2/apache2.conf
then added phpmyadmin to apache configuration:
然后将phpmyadmin添加到apache配置:
Include /etc/phpmyadmin/apache.conf
and restarted apache:
并重新启动apache:
service apache2 restart
All this by SSH.
所有这一切都通过SSH。
But now when i try to access: x.x.x.x/phpmyadmin all that i get is that my browser downloads a file... Can someone help with this?
但是现在当我尝试访问:x.x.x.x / phpmyadmin时,我得到的是我的浏览器下载文件...有人可以帮忙吗?
2 个解决方案
#1
16
If you are sure that you do have lamp-stack just open up your terminal and type edit
如果你确定你有灯组,只需打开你的终端并输入编辑
/etc/apache2/apache2.conf
and paste the following at the end of file
并将以下内容粘贴到文件末尾
Include /etc/phpmyadmin/apache.conf
You can also visit https://help.ubuntu.com/community/phpMyAdmin for more details.
您还可以访问https://help.ubuntu.com/community/phpMyAdmin了解更多详情。
#2
1
You can do two things I guess, as I've experienced both of them : 1. you need to add
我猜你可以做两件事,因为我经历过两件事:1。你需要添加
sudo -H gedit /etc/apache2/apache2.conf
2. Add this line at last or somewhere in code:
2.在最后或代码中的某处添加此行:
Include /etc/phpmyadmin/apache.conf
3. restart :
3.重启:
sudo service apache2 restart
but this didn't worked for me(apache2 failed to restart), as it worked for many. Otherwise you can eve try:
但这对我没有用(apache2无法重启),因为它适用于许多人。否则你可以试试:
ln -s /etc/phpmyadmin/apache.conf /etc/apache2/sites-enabled/001-phpmyadmin
Or
要么
sudo dpkg-reconfigure phpmyadmin
and under webserver select: apache.
并在webserver下选择:apache。
#1
16
If you are sure that you do have lamp-stack just open up your terminal and type edit
如果你确定你有灯组,只需打开你的终端并输入编辑
/etc/apache2/apache2.conf
and paste the following at the end of file
并将以下内容粘贴到文件末尾
Include /etc/phpmyadmin/apache.conf
You can also visit https://help.ubuntu.com/community/phpMyAdmin for more details.
您还可以访问https://help.ubuntu.com/community/phpMyAdmin了解更多详情。
#2
1
You can do two things I guess, as I've experienced both of them : 1. you need to add
我猜你可以做两件事,因为我经历过两件事:1。你需要添加
sudo -H gedit /etc/apache2/apache2.conf
2. Add this line at last or somewhere in code:
2.在最后或代码中的某处添加此行:
Include /etc/phpmyadmin/apache.conf
3. restart :
3.重启:
sudo service apache2 restart
but this didn't worked for me(apache2 failed to restart), as it worked for many. Otherwise you can eve try:
但这对我没有用(apache2无法重启),因为它适用于许多人。否则你可以试试:
ln -s /etc/phpmyadmin/apache.conf /etc/apache2/sites-enabled/001-phpmyadmin
Or
要么
sudo dpkg-reconfigure phpmyadmin
and under webserver select: apache.
并在webserver下选择:apache。