-1

On a new webserver (Centos 6.8) I installed phpMyAdmin via the CentOS package in order to make updates easier. It installed in /usr/share/phpMyAdmin. I gave ownership of all the files in there to the user and group that Apache runs as, and set permissions of 744.

I have set up a VirtualHost sql.example.com - for security I have not created a DNS record - the one or two people who will use it can use their hosts file.

However, I cannot access it, with the error message saying access denied due to server configuration. Which of the following do I need to do...

  1. change ownership of the directory itself (usr/share/phpMyAdmin)?
  2. point the virtualHost to /var/www/sql.example.com/public_html and create a simlink? or
  3. create /var/www/sql.example.com and move all the files there? (and will this break updates via Yum?
Richard Grevers
  • 167
  • 1
  • 12

1 Answers1

0

First of all, Restore the File Permissions and you need to make below changes in /etc/httpd/conf.d/phpMyAdmin.conf file.

Make sure you have allowed PhpMyadmin directory accessible. Comment Deny from section and add allow from 0.0.0.0 if you want phpMyadmin to be accessible from any IP.

for eg (Apache 2.2 version):

<Directory /usr/share/phpMyAdmin/>
   order deny,allow
   Deny from all
   allow from 192.168.2.0/24  #if you wish to allow only specific IPs
</Directory>
Sachin Singh
  • 171
  • 1
  • 8