Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

390
Views
Allow access to phpmyadmin from localhost only

I am trying to config my server phpmyadmin to access only from the localhost and not from the remote. Below is the configuration on server /etc/phpmyadmin/apache.conf

 Alias /phpmyadmin /usr/share/phpmyadmin

 <Directory /usr/share/phpmyadmin>
   Order deny,allow
   Deny from all
   Allow from 127.0.0.1

   Options FollowSymLinks
   DirectoryIndex index.php

</Directory>

So, while I access phpmyadmin from remote I am getting 403 forbidden which is good but when I access phpmyadmin from localhost (that is from server using remote desktop), I am still getting 403 while I think this should give access to phpmyadmin from localhost. Anything I am missing here?

Thank you

over 4 years ago · Santiago Trujillo
2 answers
Answer question

0

My guess is you are using Apache 2.4.x. The syntax for access control changed between 2.2 and 2.4. The Order and Deny syntax you're using is for Apache 2.2, but won't work for 2.4. In 2.4 it would be something like:

<Directory /usr/share/phpmyadmin>
    Require ip 127.0.0.1
    Options FollowSymLinks
    DirectoryIndex index.php
</Directory>

Reference from Apache upgrade doc, and Access Control docs.

over 4 years ago · Santiago Trujillo Report

0

I think this should work, and make it so that you can only access it locally, it should be something like this mostly, but :

<Directory /usr/share/phpmyadmin>
    Require local
    #......otherthings (also, only copy the line Require local)
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!