Setting up a development environment with Ubuntu 14.04 running in VirtualBox, following this guide: http://klau.si/dev
After installing phpmyadmin, it seems I should be able to access it at http://localhost/phpmyadmin
but apache returns a Not Found error. Did this guide leave out a configuration step somewhere? I have already tried restarting the apache service.
There is no phpmyadmin.conf file in apache2/sites-enabled or apache2/sites-available, is this required?
If so, where can I find these files?
using 127.0.0.1 instead of localhost returns the same error. The default apache page at http://localhost
works just fine.
the console in the browser shows nothing of value, simply Not Found.
I have also tried rerunning the install script with dpkg-reconfigure -plow phpmyadmin
asked Nov 12, 2014 at 16:25
Anonymous ManAnonymous Man
2,7765 gold badges19 silver badges38 bronze badges
Try this
sudo ln -s /etc/phpmyadmin/apache.conf /etc/apache2/conf-available/phpmyadmin.conf
sudo a2enconf phpmyadmin.conf
sudo systemctl restart apache2
answered Sep 11, 2017 at 9:08
Rashmi JainRashmi Jain
1,39512 silver badges18 bronze badges
1
The easiest way to do in ubuntu (I tested in ubuntu-20.04):
Step 1. Open the file:
sudo nano /etc/apache2/apache2.conf
Step 2: Add the following line at the end of file:
Include /etc/phpmyadmin/apache.conf
Step 3: Restart apache2:
sudo systemctl restart apache2.service
Dharman♦
31.1k25 gold badges86 silver badges137 bronze badges
answered Nov 6, 2020 at 16:02
protanvir993protanvir993
2,7891 gold badge20 silver badges17 bronze badges
Create a link in /var/www
like this:
sudo ln -s /usr/share/phpmyadmin /var/www/
Note: since 14.04 you may want to use /var/www/html/
instead of /var/www/
If that’s not working for you, you need to include PHPMyAdmin
inside apache configuration.
Open apache.conf
using your favorite editor, mine is nano
sudo nano /etc/apache2/apache2.conf
Then add the following line:
Include /etc/phpmyadmin/apache.conf
For Ubuntu 15.04 and 16.04
sudo ln -s /etc/phpmyadmin/apache.conf /etc/apache2/conf-available/phpmyadmin.conf
sudo a2enconf phpmyadmin.conf
sudo service apache2 reload
francescalus
30.6k16 gold badges61 silver badges96 bronze badges
answered Jan 7, 2018 at 23:48
3
Create a link in /var/www/html
like this to fix the error:
sudo ln -s /usr/share/phpmyadmin /var/www/html
The Matt
1,4321 gold badge12 silver badges22 bronze badges
answered Jan 11, 2020 at 21:02
Javed AliJaved Ali
691 silver badge6 bronze badges
1
For anyone still running into issues with this- check that you’re actually using apache! I knocked my head against this for 20 minutes or so before I remembered…I use NginX on this server…=). @john-smith, this one’s for you buddy.
To get it working on nginx, all you should have to do is create a sim link and restart php:
sudo ln -s /usr/share/phpmyadmin /var/www/html
Note that for you, it may be /var/www/
and not /var/www/html
, depending on your dir structure.
answered Jan 12, 2022 at 15:51
qozleqozle
14010 bronze badges
sudo ln -s /etc/phpmyadmin/apache.conf /etc/apache2/conf-available/phpmyadmin.conf
sudo ln -s /usr/share/phpmyadmin /var/www/html/phpmyadmin
sudo service apache2 restart
Run above commands issue will be resolved.
answered Apr 27, 2020 at 16:26
SundarSundar
2632 silver badges6 bronze badges
1
Run the following command in terminal:
sudo ln -s /usr/share/phpmyadmin /var/www/html/
answered Sep 19, 2017 at 5:57
1
It seems like sometime during the second half of 2018 many php packages such as php-mysql and phpmyadmin were removed or changed. I faced that same problem too. So you’ll have to download it from another source or find out the new packages
answered Mar 27, 2019 at 12:21
You will need to configure your apache2.conf to make phpMyAdmin works.
sudo nano /etc/apache2/apache2.conf
Then add the following line to the end of the file.
Include /etc/phpmyadmin/apache.conf
Then restart apache
sudo service apache2 restart
answered Dec 1, 2019 at 2:25
1
I had the same issue where these fixes didn’t work.
I’m on Ubuntu 20.04 using hestiaCP with Nginx.
Today after adding
Include /etc/phpmyadmin/apache.conf
into both Apache and Nginx, Nginx failed to restart. It was having an issue with «proxy_buffers» value.
Yesterday I had to modify the Nginx config to add and increase these values so Magento 2.4 would run. Today I altered «proxy_buffers» again
proxy_buffers 3 64k;
proxy_buffer_size 128k;
proxy_busy_buffers_size 128k;
After the second alteration and the removal of «Include /etc/phpmyadmin/apache.conf» from both Apache and Nginx, Magento 2.4 and PHPMyAdmin are working as expected.
answered Dec 19, 2020 at 1:09
I didn’t try Rashmi Jain’s symlink answer. It seems like it would work. But if it doesn’t work for you, perhaps try this.
I just created the file `/etc/apache2/conf-available/phpmyadmin.conf’ and added this line to it:
Include /etc/phpmyadmin/apache.conf
(rather than putting it into /etc/apache2/apache2.conf
as in Anonymous Man’s answer)
Then:
sudo a2enconf phpmyadmin
sudo systemctl reload apache2
answered Jun 1, 2022 at 20:03
Buttle ButkusButtle Butkus
9,21613 gold badges79 silver badges120 bronze badges
I had the same problem after installing mysql, apache2, php and finally phpmyadmin after each other. In my case it was solved by restarting apache2 (no need to update any configuration file):
sudo systemctl restart apache2
answered Sep 3, 2022 at 14:23
@John smith, I was facing the same issue of not being able to access phpmyadmin for 3 days, I found the solution.
— Get xampp, check this tutorial https://youtu.be/VHfij95yOpo
— Run this command before starting xampp app
sudo /etc/init.d/apache2 stop
sudo service mysql stop
That’s it, it worked for me
answered Sep 21, 2022 at 4:36
first go to the location of phpmyadmin via terminal then type this
code php -S localhost:8001
answered Nov 21, 2022 at 8:57
1
First check PhpMyAdmin
is install or not. If it is installed then search PhpMyadmin
folder. After search cut and paste that folder in location Computer->var->www->html->paste folder
. Open browser and type localhost/phpMyAdmin
and login using username and password.
currarpickt
2,3004 gold badges24 silver badges39 bronze badges
answered Dec 20, 2016 at 3:26
If you are having this problem in 2019, go to your 000-default.conf
file, by typing this subl /etc/apache2/sites-enabled/000-default.conf
(in your terminal to open the file in sublime editor)
When the file loads, locate «The ServerName directive sets the request scheme» and place this «Include /etc/phpmyadmin/apache.conf» on top .
Then restart your apache with the command…service apache2 restart
That will certainly fix the issue. Hope it helps!
Laxman
2,6432 gold badges25 silver badges32 bronze badges
answered Jun 30, 2019 at 11:48
1
Setting up a development environment with Ubuntu 14.04 running in VirtualBox, following this guide: http://klau.si/dev
After installing phpmyadmin, it seems I should be able to access it at http://localhost/phpmyadmin
but apache returns a Not Found error. Did this guide leave out a configuration step somewhere? I have already tried restarting the apache service.
There is no phpmyadmin.conf file in apache2/sites-enabled or apache2/sites-available, is this required?
If so, where can I find these files?
using 127.0.0.1 instead of localhost returns the same error. The default apache page at http://localhost
works just fine.
the console in the browser shows nothing of value, simply Not Found.
I have also tried rerunning the install script with dpkg-reconfigure -plow phpmyadmin
asked Nov 12, 2014 at 16:25
Anonymous ManAnonymous Man
2,7765 gold badges19 silver badges38 bronze badges
Try this
sudo ln -s /etc/phpmyadmin/apache.conf /etc/apache2/conf-available/phpmyadmin.conf
sudo a2enconf phpmyadmin.conf
sudo systemctl restart apache2
answered Sep 11, 2017 at 9:08
Rashmi JainRashmi Jain
1,39512 silver badges18 bronze badges
1
The easiest way to do in ubuntu (I tested in ubuntu-20.04):
Step 1. Open the file:
sudo nano /etc/apache2/apache2.conf
Step 2: Add the following line at the end of file:
Include /etc/phpmyadmin/apache.conf
Step 3: Restart apache2:
sudo systemctl restart apache2.service
Dharman♦
31.1k25 gold badges86 silver badges137 bronze badges
answered Nov 6, 2020 at 16:02
protanvir993protanvir993
2,7891 gold badge20 silver badges17 bronze badges
Create a link in /var/www
like this:
sudo ln -s /usr/share/phpmyadmin /var/www/
Note: since 14.04 you may want to use /var/www/html/
instead of /var/www/
If that’s not working for you, you need to include PHPMyAdmin
inside apache configuration.
Open apache.conf
using your favorite editor, mine is nano
sudo nano /etc/apache2/apache2.conf
Then add the following line:
Include /etc/phpmyadmin/apache.conf
For Ubuntu 15.04 and 16.04
sudo ln -s /etc/phpmyadmin/apache.conf /etc/apache2/conf-available/phpmyadmin.conf
sudo a2enconf phpmyadmin.conf
sudo service apache2 reload
francescalus
30.6k16 gold badges61 silver badges96 bronze badges
answered Jan 7, 2018 at 23:48
3
Create a link in /var/www/html
like this to fix the error:
sudo ln -s /usr/share/phpmyadmin /var/www/html
The Matt
1,4321 gold badge12 silver badges22 bronze badges
answered Jan 11, 2020 at 21:02
Javed AliJaved Ali
691 silver badge6 bronze badges
1
For anyone still running into issues with this- check that you’re actually using apache! I knocked my head against this for 20 minutes or so before I remembered…I use NginX on this server…=). @john-smith, this one’s for you buddy.
To get it working on nginx, all you should have to do is create a sim link and restart php:
sudo ln -s /usr/share/phpmyadmin /var/www/html
Note that for you, it may be /var/www/
and not /var/www/html
, depending on your dir structure.
answered Jan 12, 2022 at 15:51
qozleqozle
14010 bronze badges
sudo ln -s /etc/phpmyadmin/apache.conf /etc/apache2/conf-available/phpmyadmin.conf
sudo ln -s /usr/share/phpmyadmin /var/www/html/phpmyadmin
sudo service apache2 restart
Run above commands issue will be resolved.
answered Apr 27, 2020 at 16:26
SundarSundar
2632 silver badges6 bronze badges
1
Run the following command in terminal:
sudo ln -s /usr/share/phpmyadmin /var/www/html/
answered Sep 19, 2017 at 5:57
1
It seems like sometime during the second half of 2018 many php packages such as php-mysql and phpmyadmin were removed or changed. I faced that same problem too. So you’ll have to download it from another source or find out the new packages
answered Mar 27, 2019 at 12:21
You will need to configure your apache2.conf to make phpMyAdmin works.
sudo nano /etc/apache2/apache2.conf
Then add the following line to the end of the file.
Include /etc/phpmyadmin/apache.conf
Then restart apache
sudo service apache2 restart
answered Dec 1, 2019 at 2:25
1
I had the same issue where these fixes didn’t work.
I’m on Ubuntu 20.04 using hestiaCP with Nginx.
Today after adding
Include /etc/phpmyadmin/apache.conf
into both Apache and Nginx, Nginx failed to restart. It was having an issue with «proxy_buffers» value.
Yesterday I had to modify the Nginx config to add and increase these values so Magento 2.4 would run. Today I altered «proxy_buffers» again
proxy_buffers 3 64k;
proxy_buffer_size 128k;
proxy_busy_buffers_size 128k;
After the second alteration and the removal of «Include /etc/phpmyadmin/apache.conf» from both Apache and Nginx, Magento 2.4 and PHPMyAdmin are working as expected.
answered Dec 19, 2020 at 1:09
I didn’t try Rashmi Jain’s symlink answer. It seems like it would work. But if it doesn’t work for you, perhaps try this.
I just created the file `/etc/apache2/conf-available/phpmyadmin.conf’ and added this line to it:
Include /etc/phpmyadmin/apache.conf
(rather than putting it into /etc/apache2/apache2.conf
as in Anonymous Man’s answer)
Then:
sudo a2enconf phpmyadmin
sudo systemctl reload apache2
answered Jun 1, 2022 at 20:03
Buttle ButkusButtle Butkus
9,21613 gold badges79 silver badges120 bronze badges
I had the same problem after installing mysql, apache2, php and finally phpmyadmin after each other. In my case it was solved by restarting apache2 (no need to update any configuration file):
sudo systemctl restart apache2
answered Sep 3, 2022 at 14:23
@John smith, I was facing the same issue of not being able to access phpmyadmin for 3 days, I found the solution.
— Get xampp, check this tutorial https://youtu.be/VHfij95yOpo
— Run this command before starting xampp app
sudo /etc/init.d/apache2 stop
sudo service mysql stop
That’s it, it worked for me
answered Sep 21, 2022 at 4:36
first go to the location of phpmyadmin via terminal then type this
code php -S localhost:8001
answered Nov 21, 2022 at 8:57
1
First check PhpMyAdmin
is install or not. If it is installed then search PhpMyadmin
folder. After search cut and paste that folder in location Computer->var->www->html->paste folder
. Open browser and type localhost/phpMyAdmin
and login using username and password.
currarpickt
2,3004 gold badges24 silver badges39 bronze badges
answered Dec 20, 2016 at 3:26
If you are having this problem in 2019, go to your 000-default.conf
file, by typing this subl /etc/apache2/sites-enabled/000-default.conf
(in your terminal to open the file in sublime editor)
When the file loads, locate «The ServerName directive sets the request scheme» and place this «Include /etc/phpmyadmin/apache.conf» on top .
Then restart your apache with the command…service apache2 restart
That will certainly fix the issue. Hope it helps!
Laxman
2,6432 gold badges25 silver badges32 bronze badges
answered Jun 30, 2019 at 11:48
1
I have installed php5 and phpMyAdmin from the Ubuntu Software Centre on a fresh install of Ubuntu 13.04.
when I enter localhost in my browser the following is displayed:
It works!
This is the default web page for this server.
The web server software is running but no content has been added, yet.
So something is working.
if I then type in localhost/phpmyadmin
or localhost/phpmyadmin/index.php
the page returns a 404 error page, file not found.
I created a file in /var/www called test.php with one line in it <?php phpinfo(); ?>
when I try to access it through my browser, I get 403 Forbidden
This points to a permissions problem
with phpMyAdmin I also installed:
- Apache HTTP Server metapackage (apache2)
- Base support for JavaScript library packages (javascript-common)
- Fast webserver with minimal memory footprint (lighttpd)
- MySQL Client (mysql-client)
- GD module for php5 (php5-gd)
- MySQL Server (mysql-server)
When installing phpMyAdmin, I was not asked any questions, which I found interesting as on previous installs, I have been asked to choose a server.
The folder /etc/phpmyadmin has the following content:
- conf.d/
- config-db.php.ucf-dist
The folder conf.d has no content
Is there something I need to install which I haven’t or is there something I can do to fix the 404 & 403 errors?
Edit
owners in /var
:/var$ ls -lh
total 48K
drwxr-xr-x 2 root root 4.0K Jun 9 12:16 backups
drwxr-xr-x 21 root root 4.0K Jun 9 13:28 cache
drwxrwsrwt 2 root whoopsie 4.0K Jun 9 16:01 crash
drwxr-xr-x 73 root root 4.0K Jun 8 19:24 lib
drwxrwsr-x 2 root staff 4.0K Apr 19 10:03 local
lrwxrwxrwx 1 root root 9 Jun 9 16:00 lock -> /run/lock
drwxr-xr-x 20 root root 4.0K Jun 9 16:01 log
drwxrwsr-x 2 root mail 4.0K Apr 24 18:01 mail
drwxrwsrwt 2 root whoopsie 4.0K Apr 24 18:05 metrics
drwxr-xr-x 2 root root 4.0K Apr 24 18:01 opt
lrwxrwxrwx 1 root root 4 Jun 9 16:00 run -> /run
drwxr-xr-x 10 root root 4.0K Jun 8 19:41 spool
drwxrwxrwt 4 root root 4.0K Jun 9 16:25 tmp
drwxr-xr-x 2 www-data www-data 4.0K Jun 7 21:04 www
and:
...:/var$ ls -lh /var/www
total 12K
-rw-r--r-- 1 www-data www-data 177 Jun 7 20:30 index.html
-rw-r--r-- 1 www-data www-data 3.5K Jun 7 20:30 index.lighttpd.html
-rw-r--r-- 1 www-data www-data 20 Jun 7 21:04 test.php
-rw-r--r-- 1 www-data www-data 0 Jun 7 21:04 test.php~
on restarting the apache2 service I get the following in Terminal
simon@simon-VGN-AR71E:~$ sudo service apache2 restart
apache2: Syntax error on line 260 of /etc/apache2/apache2.conf: Could not open configuration file /etc/apache2/conf.d/phpmyadmin.conf: No such file or directory
Action 'configtest' failed.
The Apache error log may have more information.
...fail!
i renamed phpmyadmin.conf link and ran
sudo ln -s /etc/phpmyadmin/apache.conf /etc/apache2/conf.d/phpmyadmin.conf
see the broken link symbol in nautilus:
simon@simon-VGN-AR71E:~$ ls -lh /etc/apache2/conf.d
total 16K
-rw-r--r-- 1 root root 269 Jul 16 2012 charset
lrwxrwxrwx 1 root root 45 Jun 7 21:14 javascript-common.conf -> /etc/javascript-common/javascript-common.conf
-rw-r--r-- 1 root root 3.3K Jul 16 2012 localized-error-pages
-rw-r--r-- 1 root root 143 Jul 16 2012 other-vhosts-access-log
lrwxrwxrwx 1 root root 28 Jun 9 17:28 phpmyadmin.conf -> ../../phpmyadmin/apache.conf
-rw-r--r-- 1 root root 1.7K Jul 16 2012 security
END===================================
Всем доброго времени суток)
Ребята, с недавних пор перешел на Linux Ubuntu 16.04.
Возникли сложности с настройкой LAMP, а точнее с phpMyAdmin
При вводе localhost/phpmyadmin выдает ошибку 404
Not Found
The requested URL /phpmyadmin was not found on this server.
Apache/2.4.18 (Ubuntu) Server at localhost Port 80
. Перепробовал все что можно, вплоть до сноса системы, но все четно. Уверен вопрос нубский, но я то и есть нуб в этом деле, помогите, или дайте совет.
Всем заранее спасибо за ответы!!!
-
Вопрос задан
-
14012 просмотров
Пригласить эксперта
В /etc/apache2/conf-available/phpmyadmin.conf нужно перенести конфиг /etc/phpmyadmin/apache2.conf
А потом в терминале шлёпаем sudo a2enconf phpmyadmin
Апач чего то не увидел конфиг pma и выводил 404.
UPD:
Спустя год понял в чем соль. Когда выбираешь веб сервер для pma, нужно было стрелочками и пробелом выбрать нужный, а не шлёпать везде Enter.
sudo ln -s /usr/share/phpmyadmin /var/www
Вместо /var/www
вставьте путь к вашему сайту
Смотри конфиги apache.conf, указан ли в них virtualhost с путем к PhpMyAdmin.
Добрый вечер.
Как Вы ставили LAMP, phpMyadmin установили?
Существует /etc/phpmyadmin?
Если ставили при помощи tasksel, то вроде он там устанавливается вместе со всеми, а если нет, то возможно Вам надо установить его отдельно.
-
Показать ещё
Загружается…
21 сент. 2023, в 20:54
10000 руб./за проект
21 сент. 2023, в 20:40
20000 руб./за проект
21 сент. 2023, в 19:28
10000 руб./за проект
Минуточку внимания
In such cases, after installing phpMyAdmin locally in Ubuntu 20.04, users receive a 404 error when accessing the phpMyAdmin web page, specifically the one accessible via localhost/phpmyadmin. Essentially, this occurs as a result of incorrect Apache configuration. In addition, you must have MySQL installed as a prerequisite. This article will go over how to resolve this problem and continue your progress with phpMyAdmin.
Fix phpMyAdmin URL Not Found
Open terminal in your Ubuntu and type the following command to
access the Apache configuration file
sudo -H gedit /etc/apache2/apache2.conf
After typing the said
command, type the following command to setup the configuration file of Apache to
include and recognize phpMyAdmin
Include /etc/phpmyadmin/apache.conf
Then restart the
Apache service by typing this command
/etc/init.d/apache2 restart
And there You go, Your phpMyAdmin can now be accessed through localhost/phpmyadmin
References:
https://help.ubuntu.com/community/ApacheMySQLPHP#Troubleshooting_Phpmyadmin_.26_mysql-workbench
https://upload.wikimedia.org/wikipedia/commons/4/4f/PhpMyAdmin_logo.svg