Starquest321
asked on
phpmyadmin
Seemed like I did everything correct in installing phpmyadmin on centos7...except the permissions:
Forbidden
You don't have permission to access /phpmyadmin/ on this server.
When I try to access from the web server.
I edited the file:
vi /etc/httpd/conf.d/phpMyAdm in.conf
And commented out as per instructions on:
http://www.howtoforge.com/apache_php_mysql_on_centos_7_lamp
Forbidden
You don't have permission to access /phpmyadmin/ on this server.
When I try to access from the web server.
I edited the file:
vi /etc/httpd/conf.d/phpMyAdm
And commented out as per instructions on:
http://www.howtoforge.com/apache_php_mysql_on_centos_7_lamp
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
yup Seth is correct I just put the modification there, but based on your edit in VI, it shows:
/etc/httpd/conf.d/phpMyAdm in.conf
so the entry should be:
/etc/httpd/conf.d/phpMyAdm
so the entry should be:
<Directory "/usr/share/phpMyAdmin">
Order allow,deny
Allow from all
</Directory>
ASKER
Just a small confusion: which file do I need to edit? On top it said:
/etc/httpd/conf/httpd.conf
now I am reading:
/etc/httpd/conf.d/phpMyAdm in.conf
/etc/httpd/conf/httpd.conf
now I am reading:
/etc/httpd/conf.d/phpMyAdm
phpMyAdmin.conf
i think the first one was a typo
i think the first one was a typo
ASKER
so I need to delete the changes made in httpd.conf?
remove that broken conf file and "yum reinstall phpMyAdmin" package
It will place default conf back
It will place default conf back
ASKER
/etc/httpd/conf/httpd.conf
So how can I delete that file? What command to run?
And the reinstall will reset that one?
So how can I delete that file? What command to run?
And the reinstall will reset that one?
httpd.conf is the configuration file for apache; don't delete that
reinstalling phpMyAdmin package should replace the phpMyAdmin.conf with the default
reinstalling phpMyAdmin package should replace the phpMyAdmin.conf with the default
ASKER
Here is the exact file that I have: What did I do wrong?
vi /etc/httpd/conf.d/phpMyAdm in.conf
Deny from All
Allow from None
</Directory>
<Directory /usr/share/phpMyAdmin/setu p/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>
<Directory "/usr/share/phpMyAdmin">
Order allow,deny
Allow from all
</Directory>
vi /etc/httpd/conf.d/phpMyAdm
Deny from All
Allow from None
</Directory>
<Directory /usr/share/phpMyAdmin/setu
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>
<Directory "/usr/share/phpMyAdmin">
Order allow,deny
Allow from all
</Directory>
the phpMyAdmin Directory directive - move to phpMyAdmin.conf and remove those 4 lines from httpd.conf
ASKER
Seth: I am so new . . that you have completed steps in your head that I do not know how to do:
1. "the phpMyAdmin Directory directive" - what does that mean? is that a line?
2. How do I move? Move the file? Move the text?
3. How can I check those 4 lines removed from httpd.conf
1. "the phpMyAdmin Directory directive" - what does that mean? is that a line?
2. How do I move? Move the file? Move the text?
3. How can I check those 4 lines removed from httpd.conf
ASKER
I deleted that file . . .reinstalled...have a new copy of the phpMyAdmin.conf
I added these lines at the end:
<Directory "/usr/share/phpMyAdmin">
Order allow,deny
Allow from all
</Directory>
But realized that I maybe blocked by the default lines from the install:
<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>
I added these lines at the end:
<Directory "/usr/share/phpMyAdmin">
Order allow,deny
Allow from all
</Directory>
But realized that I maybe blocked by the default lines from the install:
<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>
Yes, you are blocked by them.
Just add lines to apache 2.2 section:
Allow from your_ip
and reload apache
Just add lines to apache 2.2 section:
Allow from your_ip
and reload apache
ASKER
gheist: Can you detail the exact steps?
ASKER
How do I know where section 2.2 is?
Add one line to text file and reload apache service?
ASKER
Allow from your_ip . .
but I want from ALL ips . . not just my IP. . .
And you mean at the end of this file:
/etc/httpd/conf/httpd.conf ?
but I want from ALL ips . . not just my IP. . .
And you mean at the end of this file:
/etc/httpd/conf/httpd.conf
No, you dont want. Thats why config file is clamped, so that people dont start something stupid.
ASKER
In /etc/httpd/conf/httpd.conf . . . I added the line:
Allow from xx.xx.xx.xx (My IP) and then saved . .restarted. Not working. Sorry I am so new that I need detailed steps. Where exact should I add this line?
Allow from xx.xx.xx.xx (My IP) and then saved . .restarted. Not working. Sorry I am so new that I need detailed steps. Where exact should I add this line?
Last time you mentioned phpMyAdmin.conf that has Apache 2.2 section. So edit that and undo changes in httpd.conf.
ASKER
<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 xx.xx.xx.xx
Allow from ::1
</IfModule>
</Directory>
I have added that ALLOW FROM . . and at the end I have:
<Directory "/usr/share/phpMyAdmin">
Order allow,deny
Allow from all
</Directory>
Do I need to an IP there as well?
I still just keep getting that:
Forbidden
You don't have permission to access /phpMyAdmin on this server.
<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 xx.xx.xx.xx
Allow from ::1
</IfModule>
</Directory>
I have added that ALLOW FROM . . and at the end I have:
<Directory "/usr/share/phpMyAdmin">
Order allow,deny
Allow from all
</Directory>
Do I need to an IP there as well?
I still just keep getting that:
Forbidden
You don't have permission to access /phpMyAdmin on this server.
You forgot the reload part
ASKER
I reboot the whole machine . . .
ASKER
ASKER
By the way:
apachectl graceful
Job for httpd.service failed. See 'systemctl status httpd.service' and 'journalctl -xn' for details.
Is that any indication of errors?
apachectl graceful
Job for httpd.service failed. See 'systemctl status httpd.service' and 'journalctl -xn' for details.
Is that any indication of errors?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
8-31-2014-8-56-38-AM.png