Ошибка 404 phpmyadmin apache

Has anyone had problems with 404 errors and phpmyadmin after upgrading to Apache 2.4?

My ubuntu machine ran the upgrade a few days ago and I have not been able to access localhost/phpmyadmin since. I just get 404 errors.

I know there have been security changes in 2.4 but I checked out the settings in the phpmyadmin.conf loaded by apache and I can’t see anything that would affect non-admin users. Furthermore I commented out the old security rules and added the new ones, but still not working…

asked Aug 3, 2013 at 9:01

DatsunBing's user avatar

DatsunBingDatsunBing

8,69417 gold badges87 silver badges172 bronze badges

1

the directory of configuration files apparently changed in apahe 2.4 fron conf.d to conf-available. Also, the conf files must be loaded explicitly. I did

sudo cp /etc/apache2/conf.d/phpmyadmin.conf /etc/apache2/conf-available/

sudo a2enconf phpmyadmin 

sudo service apache2 reload

answered Oct 4, 2013 at 7:53

mmzc's user avatar

2

Here’s what I found.

The configuration file is /etc/phpmyadmin/apache.conf.

The package installer for phpMyAdmin creates a link from /etc/apache2/conf.d/phpmyadmin.conf to the configuration file.

In my case, Apache did not seem to be picking up that configuration. So I created a link in my «sites-available» folder and enabled the site:

ln -s /etc/phpmyadmin/apache.conf /etc/apache2/sites-available/phpmyadmin.conf

a2ensite phpmyadmin

Seems to be working fine now.

answered Aug 8, 2013 at 15:02

Kryten's user avatar

KrytenKryten

15.3k6 gold badges45 silver badges68 bronze badges

Ok so I found the answer with a bit of fiddling.

Basically /phpmyadmin is an alias for /usr/share/phpmyadmin This was previously defined in phpmyadmin.conf. I now have it defined in the apache2 alias.conf file, and it works fine.

Not sure if that means that I am missing out on other things defined in phpmyadmin.conf, but will have to see, I suppose.

answered Aug 4, 2013 at 5:44

DatsunBing's user avatar

DatsunBingDatsunBing

8,69417 gold badges87 silver badges172 bronze badges

Apache update probably overwrites config.

Adding include conf.d/phpmyadmin.conf to /etc/apache2/apache2.conf should fix it.

answered Dec 4, 2013 at 9:05

umpirsky's user avatar

umpirskyumpirsky

9,90213 gold badges71 silver badges96 bronze badges

Make sure you have selected your httpd server, during the installatino process. I thought I had checked apache, but I didnot.

I removed phpmyadmin and reinstall it taking care to check apache this time, and everything was automatically setted up. I was finally able to use phpmyadmin without configure anything else.

answered Jan 18, 2016 at 18:08

besrow's user avatar

Has anyone had problems with 404 errors and phpmyadmin after upgrading to Apache 2.4?

My ubuntu machine ran the upgrade a few days ago and I have not been able to access localhost/phpmyadmin since. I just get 404 errors.

I know there have been security changes in 2.4 but I checked out the settings in the phpmyadmin.conf loaded by apache and I can’t see anything that would affect non-admin users. Furthermore I commented out the old security rules and added the new ones, but still not working…

asked Aug 3, 2013 at 9:01

DatsunBing's user avatar

DatsunBingDatsunBing

8,69417 gold badges87 silver badges172 bronze badges

1

the directory of configuration files apparently changed in apahe 2.4 fron conf.d to conf-available. Also, the conf files must be loaded explicitly. I did

sudo cp /etc/apache2/conf.d/phpmyadmin.conf /etc/apache2/conf-available/

sudo a2enconf phpmyadmin 

sudo service apache2 reload

answered Oct 4, 2013 at 7:53

mmzc's user avatar

2

Here’s what I found.

The configuration file is /etc/phpmyadmin/apache.conf.

The package installer for phpMyAdmin creates a link from /etc/apache2/conf.d/phpmyadmin.conf to the configuration file.

In my case, Apache did not seem to be picking up that configuration. So I created a link in my «sites-available» folder and enabled the site:

ln -s /etc/phpmyadmin/apache.conf /etc/apache2/sites-available/phpmyadmin.conf

a2ensite phpmyadmin

Seems to be working fine now.

answered Aug 8, 2013 at 15:02

Kryten's user avatar

KrytenKryten

15.3k6 gold badges45 silver badges68 bronze badges

Ok so I found the answer with a bit of fiddling.

Basically /phpmyadmin is an alias for /usr/share/phpmyadmin This was previously defined in phpmyadmin.conf. I now have it defined in the apache2 alias.conf file, and it works fine.

Not sure if that means that I am missing out on other things defined in phpmyadmin.conf, but will have to see, I suppose.

answered Aug 4, 2013 at 5:44

DatsunBing's user avatar

DatsunBingDatsunBing

8,69417 gold badges87 silver badges172 bronze badges

Apache update probably overwrites config.

Adding include conf.d/phpmyadmin.conf to /etc/apache2/apache2.conf should fix it.

answered Dec 4, 2013 at 9:05

umpirsky's user avatar

umpirskyumpirsky

9,90213 gold badges71 silver badges96 bronze badges

Make sure you have selected your httpd server, during the installatino process. I thought I had checked apache, but I didnot.

I removed phpmyadmin and reinstall it taking care to check apache this time, and everything was automatically setted up. I was finally able to use phpmyadmin without configure anything else.

answered Jan 18, 2016 at 18:08

besrow's user avatar

Follow us on Social Media

Phpmyadmin Throws A 404 On Opening With Code Examples

This article will demonstrate via examples how to resolve the Phpmyadmin Throws A 404 On Opening error .

1. sudo ln -s /etc/phpmyadmin/apache.conf /etc/apache2/conf-available/phpmyadmin.conf
2. sudo a2enconf phpmyadmin
3. sudo service apache2 reload

By examining a variety of different samples, we were able to resolve the issue with the Phpmyadmin Throws A 404 On Opening directive that was included.

How do I fix error 404 in PHP?

How to Fix the HTTP Error 404 “The Requested Resource Is Not Found” in XAMPP (5 Tips)

  • Be Sure You Typed the URL Correctly.
  • Check Your .
  • Deactivate and Uninstall New Plugins.
  • Check Your Database for Changes.
  • Check Your Apache Configuration.

How do I fix phpMyAdmin 404 not found Ubuntu?

Fix for PhpMyAdmin Not found (404 Error) – Apache Ubuntu

  • Check the location of apache.conf file.
  • Open this ‘apache2.conf’ file with any editor and include phpmyadmn configuration file path under it.
  • Include phpmyadmn configuration file path at the bottom of this file.

How do you solve HTTP Error 404 the requested resource is not found?

How to Fix the 404 Not Found Error

  • Retry the web page by pressing F5, clicking/tapping the refresh/reload button, or trying the URL from the address bar again.
  • Check for errors in the URL.
  • Move up one directory level at a time in the URL until you find something.
  • Search for the page from a popular search engine.

What to do when phpMyAdmin is not working?

You may receive an error message stating that phpMyAdmin needs a PHP version within a specific range. This might happen if you’re running an outdated version of PHP, or a new update is not compatible with your version of MAMP. In this case, you”ll need to change the PHP version of your MAMP application.16-Sept-2022

Why do I keep getting error 404?

404 error codes are generated when a user attempts to access a webpage that does not exist, has been moved, or has a dead or broken link. The 404 error code is one of the most frequent errors a web user encounters. Servers are required to respond to client requests, such as when a user attempts to visit a webpage.

How do I fix error code 404?

Here are some ways you can try to resolve a 404 error:

  • Double-check the URL you’ve entered, especially if you typed it by hand.
  • Refresh the webpage.
  • Use Google (or a similar search engine) to try and find the page again.
  • Try to get there on another device.
  • Use the Internet Archive’s Wayback Machine.

How do I start phpMyAdmin on localhost?

Once phpMyAdmin is installed point your browser to http://localhost/phpmyadmin to start using it. You should be able to login using any users you’ve setup in MySQL. If no users have been setup, use admin with no password to login. Then select Apache 2 for the webserver you wish to configure.15-Jan-2015

Why is phpMyAdmin not connecting?

phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, username and password in your configuration and make sure that they correspond to the information given by the administrator of the MySQL server.

How do I fix localhost and phpMyAdmin is not open in xampp?

Replace “Listen 80” to “Listen 8080“ . Again find another “Listen” now change “ServerName localhost:80” to “ServerName localhost:8080” and then save it. “We are almost done to fix localhost/phpmyadmin” Step 6: Again go to config and select “Apache (httpd-sss. conf)“.27-Feb-2012

Is it correct to return 404 when a rest resource is not found?

404 – Not Found. The resource may exist and you may not have permission to see the resource, will also be equivalent of Not Found. So 404 for a call where data doesn’t exist is a very apt thing to do. Now as for a non-existing URL; though 404 is a widely adapted response code 400 is a more appropriate code.

Follow us on Social Media

So, you tried to access phpmyadmin and got ‘phpMyAdmin Error 404 Page Not Found’ or ‘page not found’?

phpmyadmin 404 solution

This is real nasty thing and irritates nearly everyone. To have it working properly is must for every webmaster. So, let’s see what you can do.

This error appears when you try to access phpMyAdmin control panel / dashboard using domain or IP address in this way;

mydomain.com/phpmyadmin

OR

127.0.0.1/phpmyadmin

This problem is mostly caused due to improper directives or misconfiguration in Apache. It doesn’t happen with every server and apache config. Just some are prone to it.

Method 1: Configuring Directives

1. Connect to your server using SSH (Putty etc).
2. Now, copy-paste this command;

sudo nano /etc/httpd/conf/httpd.conf

3. This file contains all the directives needed for a server to redirect, process or identify different name based servers etc.

4. Go to end of this configuration file. Most probably you will find configuration of your server. If not then find your virtual server host configuration and copy-paste the following;

Alias /phpmyadmin '/var/www/html/phpmyadmin/'

<Directory /var/www/html/phpmyadmin>
Options FollowSymLinks
DirectoryIndex index.php

<IfModule mod_php5.c>
AddType application/x-httpd-php .php
php_flag magic_quotes_gpc Off
php_flag track_vars On
php_flag register_globals Off
php_value include_path .
</IfModule>
</Directory>

5. Now restart the httpd (apache) by using command;

sudo service httpd restart

6. Try to access phpMyAdmin control panel using domain or IP in this fashion;

domain.com/phpmyadmin

7. You must see the phpMyAdmin Login page.

8. Done!

If this doesn’t work out for you then you must reconsider the path of Apache config file. Different OS have different locations and also different commands to restart the services.

One more but old method was to symlink the httpd configuration. This may work on older servers, Ubuntu OS and other apache versions.

Method 2: Symlinking

1. Connect to VPS, server etc and type this;

 sudo dpkg-reconfigure -plow phpmyadmin

2. You will have option to select Apache webserver to configure. Select it as per your domain.

3.  If above fails then you can directly copy-paste the following;

sudo ln -s /etc/phpmyadmin/apache.conf /etc/apache2/conf.d/phpmyadmin.conf
sudo /etc/init.d/apache2 reload

This will symlink the config files.

4. Now try to access the phpMyAdmin. You shall not get 404 Error Page Not Found.

Done! Comments and issues are welcome as always.

If this or other problem persist. You may want to review your installation of phpMyAdmin, MySQL, Apache or PHP here.

For other errors and troubleshooting of phpMyAdmin, read this article.

Enjoy!

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

Понравилась статья? Поделить с друзьями:
  • Ошибка 404 flask
  • Ошибка 404 готовая
  • Ошибка 403 роблокс при запуске
  • Ошибка 404 express
  • Ошибка 404 not found что это значит