LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   You don't have permission to access /phpmyadmin/ on this server. (https://www.linuxquestions.org/questions/linux-newbie-8/you-dont-have-permission-to-access-phpmyadmin-on-this-server-750725/)

jonaskellens 08-27-2009 05:11 PM

You don't have permission to access /phpmyadmin/ on this server.
 
I am connected via OpenVPN to the server that has PhpMyAdmin installed. The server is 10.10.0.1 and my client is 10.10.0.2.

When I want to access phpmyadmin, the webpage states :
Code:

You don't have permission to access /phpmyadmin/ on this server.
This is my config :
Code:

bash-3.2# cat /etc/httpd/conf.d/phpmyadmin.conf
<Directory "/usr/share/phpmyadmin">
  Order Deny,Allow
  Deny from all
  Allow from 10.10.0.2
</Directory>

Why don't I have permission ??

Extra info :
Code:

[jonas@jonas ~]$ ifconfig tun0
tun0      Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 
          inet addr:10.10.0.2  P-t-P:10.10.0.1  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1500  Metric:1
          RX packets:1282 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1145 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100
          RX bytes:1012756 (989.0 KiB)  TX bytes:113557 (110.8 KiB)

Log states :
Code:

[Fri Aug 28 00:11:56 2009] [error] [client 10.10.0.2] Directory index forbidden by Options directive: /usr/share/phpmyadmin/
[Fri Aug 28 00:11:59 2009] [error] [client 10.10.0.2] Directory index forbidden by Options directive: /usr/share/phpmyadmin/
[Fri Aug 28 00:15:04 2009] [error] [client 10.10.0.2] Directory index forbidden by Options directive: /usr/share/phpmyadmin/


anomie 08-27-2009 05:24 PM

Apache is not finding an index page (e.g. .html, .php) to serve, so it's trying to display a directory index. But... you've disabled that (which is probably fine because it's not what you're trying to do anyway).

What have you provided for the DirectoryIndex directive in httpd.conf?

jonaskellens 08-27-2009 05:32 PM

Quote:

Originally Posted by anomie (Post 3660068)
What have you provided for the DirectoryIndex directive in httpd.conf?

Code:

DirectoryIndex index.html index.html.var
I left everything default...

I just need httpd for running PhpMyAdmin...

anomie 08-27-2009 05:39 PM

If you haven't already, install mod_php.

And what distro is this? Fedora? CentOS?

-------

edit: On some distros, mod_php is included with the php package.

jonaskellens 08-27-2009 05:48 PM

Quote:

Originally Posted by anomie (Post 3660080)
If you haven't already, install mod_php.

And what distro is this? Fedora? CentOS?

-------

edit: On some distros, mod_php is included with the php package.

This is CentOS 5.3.
Re-installing the php-package made it work.
Thanks for the help !

dgreenhouse 12-19-2009 02:25 PM

I had this same issue.

I noticed that when I uncompressed the phpMyAdmin archive and moved it to the target location I was getting the permissions error.

I performed a copy (cp) of the uncompressed folder and it worked!
(I downloaded the english only archive)

(Note: I'm running CentOS 5.4 i386)

Steps...

0- After downloading the tar file to /tmp
1- cd /tmp
2- tar -xzvf phpMyAdmin-3.2.4-english.tar.gz
3- cp -Rf phpMyAdmin-3.2.4-english /usr/share/phpmyadmin
4- echo "alias /phpmyadmin /usr/share/phpmyadmin" > /etc/httpd/conf.d/phpmyadmin.conf
4a- You can add <DirectoryIndex ...> ... </DirectoryIndex> to phpmyadmin.conf, but I'm running locally for the moment and didn't need it. The alias command worked just fine.
5- cp /usr/share/phpmyadmin/config.sample.inc.php /usr/share/phpmyadmin/config.inc.php
6- Make the appropriate changes to: config.inc.php
7- service httpd restart or /etc/init.d/httpd restart

After that, it worked just fine...


All times are GMT -5. The time now is 11:32 PM.