LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Apache/2.2.22 (Ubuntu) Server at localhost Port 80 (https://www.linuxquestions.org/questions/linux-newbie-8/apache-2-2-22-ubuntu-server-at-localhost-port-80-a-4175444351/)

Francis Musyoki 01-06-2013 07:13 AM

Apache/2.2.22 (Ubuntu) Server at localhost Port 80
 
LAMP is working well since localhost/info.php gives me a page but when I write localhost/phpmyapache/ I get an error shown above. I'm using linux 12.10, I have set all the permissions at /var/www to chmod 777!
Please help asap!

EricTRA 01-06-2013 07:18 AM

Hello and welcome to LinuxQuestions,

What distro and version are you using? How did you install PhpMyAdmin, using package manager? And don't set your permissions to 777, that's a real bad idea from any point of view, not only security. Depending on what distro you are using you should have a /etc/httpd/conf.d or /etc/apache2/conf.d directory. Do you have a file phpmyadmin.conf in there? Looking forward to your participation in the forums.

Kind regards,

Eric

Wim Sturkenboom 01-06-2013 07:33 AM

Is that error in the title the full error? The line you showed in the title is normally just the 'footer' of the error page and there usually is more info.

Quote:

localhost/phpmyapache/
I doubt that that exists ;) Typo here in the forum or in your url on your machine.

EricTRA 01-06-2013 07:38 AM

Quote:

Originally Posted by Wim Sturkenboom (Post 4863874)
Is that error in the title the full error? The line you showed in the title is normally just the 'footer' of the error page and there usually is more info.


I doubt that that exists ;) Typo here in the forum or in your url on your machine.

Hi Wim,

Nice catch, didn't even see that one. I assume it's a typo on the user's end, hope he comes back with something.

Kind regards,

Eric

Francis Musyoki 01-06-2013 07:47 AM

localhost/phpmyadmin/ is the tite, thanks William

The error I get is:
The requested URL /phpmyadmin was not found on this server.

Apache/2.2.22 (Ubuntu) Server at localhost Port 80

Francis Musyoki 01-06-2013 07:58 AM

My distro version is:
Linux francis-PC 3.5.0-17-generic #28-Ubuntu SMP Tue Oct 9 19:32:08 UTC 2012 i686 i686 i686 GNU/Linux

When I typed both commands I saw an empty file, what is the full command that will help me see phpmyadmin.conf?
francis@francis-PC:~$ sudo nano /etc/apache2/conf.d
sudo: unable to resolve host francis-PC
francis@francis-PC:~$ sudo nano /etc/httpd/conf.d
sudo: unable to resolve host francis-PC

EricTRA 01-06-2013 08:01 AM

Hi,

That happens because you tried to open a directory. Try:
Code:

ls /etc | egrep "apache2|httpd"
to see which it is. Since you're using Ubuntu it'll almost certainly be apache2, so if it is run this:
Code:

ls /etc/apache2/conf.d
and see if you have a file phpmyadmin.conf in there.

Kind regards,

Eric

Francis Musyoki 01-06-2013 08:12 AM

Hi Eric,
I entered the commands
francis@francis-PC:~$ ls /etc | egrep "apache2|httpd"
apache2

francis@francis-PC:~$ ls /etc/apache2/conf.d
charset localized-error-pages other-vhosts-access-log security

francis@francis-PC:~$ ls /etc/apache2/
apache2.conf envvars magic mods-enabled sites-available
conf.d httpd.conf mods-available ports.conf sites-enabled

I managed to see the apache2 file, viewed it and also saw conf.d, so what do I do next? As you can see, the underlined line of code gives an error!

EricTRA 01-06-2013 08:17 AM

Hi,

Why do you think the underlined code gives an error? It's a listing of what's in the /etc/apache2/conf.d directory. Do you have a directory /etc/phpmyadmin? How did you install PhpMyAdmin?

Kind regards,

Eric

Francis Musyoki 01-06-2013 08:27 AM

Hi Eric,

I think phpmyadmin exists, since when I enter the command;

francis@francis-PC:~$ ls /etc/phpmyadmin/
apache.conf config.header.inc.php lighttpd.conf
config-db.php config.inc.php phpmyadmin.desktop
config.footer.inc.php htpasswd.setup phpmyadmin.service

I can see some content.
I installed using sudo/tasksel
first I installed lamp, then I installed phpmyadmin using the command ....sudo apt-get install phpmyadmin and choose apache2. was using a tutorial found in http://www.allaboutlinux.eu/joomla-2-5-3-on-ubuntu/3/

EricTRA 01-06-2013 08:33 AM

Hi,

Thanks for the info. Can you check if you have in /etc/apache2/apache2.conf the following line:
Code:

Include /etc/phpmyadmin/apache.conf
and reply.

Kind regards,

Eric

Francis Musyoki 01-06-2013 08:59 AM

Hi Eric,

I've typed the command but what I get is:

francis@francis-PC:~$ ls /etc/apache2/apache2.conf
/etc/apache2/apache2.conf
francis@francis-PC:~$ /etc/apache2/apache2.conf
bash: /etc/apache2/apache2.conf: Permission denied
francis@francis-PC:~$ sudo /etc/apache2/apache2.conf
sudo: unable to resolve host francis-PC
sudo: /etc/apache2/apache2.conf: command not found

What might be the problem?

EricTRA 01-06-2013 09:03 AM

Hello Francis,

That happens because you're not trying to open the file, you're just listing it (ls). Try with this:
Code:

grep phpmyadmin /etc/apache2/apache2.conf
and see if it outputs the line I told you about (Include /etc/phpmyadmin/apache.conf).

Kind regards,

Eric

Francis Musyoki 01-06-2013 09:14 AM

Hi Eric;
When I typed the command it seems their is no matching eord in the file. what is wrong?

francis@francis-PC:~$ grep phpmyadmin /etc/apache2/apache2.conf
francis@francis-PC:~$ grep phpmyadmin /etc/apache2/apache2.conf
francis@francis-PC:~$

kind regards, Francis.

EricTRA 01-06-2013 09:22 AM

Hi,

Problem is that the necessary line to include the configuration file for PhpMyAdmin in the Apache configuration, so that Apache can serve your webpages for PhpMyAdmin, is not included. There are a couple of ways to try to fix this, let's take it one by one, starting by the easiest.

Run the following in the terminal:
Code:

sudo dpkg-reconfigure -plow phpmyadmin
That will reconfigure the installation of phpmyadmin and should either include the line in apache.conf or copy the file for PhpMyAdmin to the correct path /etc/apache2/conf.d (or create a symlink. After you did that, if it finishes correctly without throwing an error, check again with the grep command:
Code:

grep phpmyadmin /etc/apache2/apache2.conf
If the line exists, reload apache with the following command:
Code:

sudo /etc/init.d/apache2 reload
and see if you can connect to the PhpMyAdmin page (http://localhost/phpmyadmin. If this is unsuccessful, then run the following:
Code:

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

and try again to connect.

Kind regards,

Eric


All times are GMT -5. The time now is 12:41 AM.