View Single Post
  #8  
Old 30th January 2013, 21:19
suffolk suffolk is offline
Junior Member
 
Join Date: Jan 2013
Posts: 5
Thanks: 1
Thanked 0 Times in 0 Posts
Default

im unable to connect myphpadmin error message

Forbidden

You don't have permission to access /phpmyadmin/ on this server.

Apache/2.2.15 (CentOS) Server at 192.168.1.1** Port 80
================================================== ==
this is what i did previous




vi /etc/httpd/conf.d/phpmyadmin.conf

i just added the following line

Alias /mysqladmin /usr/share/phpmyadmin <---


# phpMyAdmin - Web based MySQL browser written in php
#
# Allows only localhost by default
#
# But allowing phpMyAdmin to anyone other than localhost should be considered
# dangerous unless properly secured by SSL

Alias /phpMyAdmin /usr/share/phpMyAdmin
Alias /phpmyadmin /usr/share/phpMyAdmin
Alias /mysqladmin /usr/share/phpmyadmin <---

<Directory /usr/share/phpMyAdmin/>
<IfModule mod_authz_core.c>
# Apache 2.4
<RequireAny>
Require ip 127.0.0.1
Require ip ::1
</RequireAny>
</IfModule>
<IfModule !mod_authz_core.c>
# Apache 2.2
Order Deny,Allow
Deny from All
Allow from 127.0.0.1
Allow from ::1
</IfModule>
</Directory>

<Directory /usr/share/phpMyAdmin/setup/>
<IfModule mod_authz_core.c>
# Apache 2.4
<RequireAny>
Require ip 127.0.0.1
Require ip ::1
</RequireAny>
</IfModule>
<IfModule !mod_authz_core.c>
# Apache 2.2
Order Deny,Allow
Deny from All
Allow from 127.0.0.1
Allow from ::1
</IfModule>
</Directory>

# These directories do not require access over HTTP - taken from the original
# phpMyAdmin upstream tarball
#
<Directory /usr/share/phpMyAdmin/libraries/>
Order Deny,Allow
Deny from All
Allow from None
</Directory>

<Directory /usr/share/phpMyAdmin/setup/lib/>
Order Deny,Allow
Deny from All
Allow from None
</Directory>

<Directory /usr/share/phpMyAdmin/setup/frames/>
Order Deny,Allow
Deny from All
Allow from None
</Directory>

# This configuration prevents mod_security at phpMyAdmin directories from
# filtering SQL etc. This may break your mod_security implementation.
#
#<IfModule mod_security.c>
# <Directory /usr/share/phpMyAdmin/>
# SecRuleInheritance Off
# </Directory>
#</IfModule>

==================================================

Next we change the authentication in phpMyAdmin from cookie to http:



vi /usr/share/phpmyadmin/config.inc.php

as there was no config.inc.php i made 1 and pasted lines below and rebooted (config.sample.inc.php is still there)

[...]
/* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'http';
[...]
=============================================

Then we create the system startup links for Apache and start it:

chkconfig --levels 235 httpd on
/etc/init.d/httpd start

Now you can direct your browser to server1.example.com/phpmyadmin or 192.168.0.100/phpmyadmin and log in with the user name root and your new root MySQL password.

Apache2 test page does show with just ip

john

Last edited by suffolk; 30th January 2013 at 21:31.
Reply With Quote