LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 07-21-2014, 01:23 PM   #1
andrewm659
Member
 
Registered: Oct 2004
Distribution: CentOS/Fedora/OpenSuse
Posts: 61

Rep: Reputation: 1
Wink phpmyadmin on centos 7


Hi,
I am trying to setup phpmyadmin on CentOS 7 to access my mariadb setup. However I I can't browse to it. not sure why...here is my config for the /etc/httpd/conf.d/phpMyAdmin.conf:

# 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 /phpmyadmin /usr/share/phpmyadmin

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

<Directory /usr/share/phpMyAdmin/setup/>
<IfModule mod_authz_core.c>
# Apache 2.4
<RequireAny>
Require All Granted
</RequireAny>
</IfModule>
<IfModule !mod_authz_core.c>
# Apache 2.2
Order Deny,Allow
Allow from All
</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>

[root@sql01 share]# ls -la |grep php
drwxr-xr-x. 2 root root 6 Jun 9 22:57 php
drwxr-xr-x. 9 apache apache 4096 Jul 17 18:15 phpMyAdmin
-rw-r--r--. 1 root root 9081994 Jul 17 18:23 phpMyAdmin-4.2.6-all-languages.zip
[root@sql01 share]#
 
Old 07-21-2014, 01:30 PM   #2
andrewm659
Member
 
Registered: Oct 2004
Distribution: CentOS/Fedora/OpenSuse
Posts: 61

Original Poster
Rep: Reputation: 1
[root@sql01 share]# tail -f /var/log/httpd/error_log
[Mon Jul 21 12:52:50.308057 2014] [authz_core:error] [pid 2879] [client 10.150.1.99:60739] AH01630: client denied by server configuration: /usr/share/phpMyAdmin
[Mon Jul 21 12:53:35.770464 2014] [mpm_prefork:notice] [pid 2875] AH00170: caught SIGWINCH, shutting down gracefully
[Mon Jul 21 12:53:36.829539 2014] [suexec:notice] [pid 2893] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Mon Jul 21 12:53:36.851586 2014] [auth_digest:notice] [pid 2893] AH01757: generating secret for digest authentication ...
[Mon Jul 21 12:53:36.852200 2014] [lbmethod_heartbeat:notice] [pid 2893] AH02282: No slotmem from mod_heartmonitor
[Mon Jul 21 12:53:36.869725 2014] [mpm_prefork:notice] [pid 2893] AH00163: Apache/2.4.6 (CentOS) PHP/5.4.16 configured -- resuming normal operations
[Mon Jul 21 12:53:36.869753 2014] [core:notice] [pid 2893] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
[Mon Jul 21 12:53:59.537674 2014] [authz_core:error] [pid 2895] [client 10.150.1.99:60750] AH01630: client denied by server configuration: /usr/share/phpmyadmin
[Mon Jul 21 14:00:21.530701 2014] [authz_core:error] [pid 2896] [client 10.150.1.99:33180] AH01630: client denied by server configuration: /usr/share/phpmyadmin
[Mon Jul 21 14:04:48.101658 2014] [mpm_prefork:notice] [pid 2893] AH00170: caught SIGWINCH, shutting down gracefully
^C
[root@sql01 share]#
 
Old 07-22-2014, 03:09 AM   #3
linuxfreakz
LQ Newbie
 
Registered: Jul 2014
Location: Karachi
Distribution: Ubuntu
Posts: 10

Rep: Reputation: Disabled
Hello,

First make sure it's not SELinux the culprit.
And then edit /etc/httpd/conf.d/phpMyAdmin.conf and use:

Code:
<Directory /usr/share/phpMyAdmin/>
order deny,allow
deny from all
allow from 192.168.2.0/24
</Directory>

And If you are still facing same then

allow from 127.0.0.1

---
linuxfreakz
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
What is the right method to install phpMyAdmin on my centos 6.2 newbie14 Linux - Software 8 05-14-2012 12:24 AM
Installing phpMyAdmin on a Centos 6.0 rewards Linux - Software 3 01-09-2012 04:26 PM
How to install PHPMYADMIN in centos 6? agriz Linux - Software 4 11-28-2011 12:00 AM
CentOS phpmyAdmin keleas Linux - Server 2 10-27-2010 05:13 AM
setup PHPMYADMIN on CENTOS bradsmiley Linux - Server 1 08-30-2006 03:10 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration