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

前端 未结 11 1421
死守一世寂寞
死守一世寂寞 2020-12-07 09:09

Hi I have installed phpmyadmin on my centos machine and when I try to hit phpmyadmin through my browser I get this error :

Forbidden
You don\'t          


        
相关标签:
11条回答
  • 2020-12-07 10:00

    Find your IP address and replace where ever you see 127.0.0.1 with your workstation IP address you get from the link above.

    . . .
    Require ip your_workstation_IP_address
    . . .
    Allow from your_workstation_IP_address
    . . .
    Require ip your_workstation_IP_address
    . . .
    Allow from your_workstation_IP_address
    . . .
    

    and in the end don't forget to restart the server

    sudo systemctl restart httpd.service
    
    0 讨论(0)
  • 2020-12-07 10:01

    You need to follow the following steps:

    Find line that read follows

    Require ip 127.0.0.1
    

    Replace with your workstation IP address:

    Require ip 10.1.3.53
    

    Again find the following line:

    Allow from 127.0.0.1
    

    Replace as follows:

    Allow from 10.1.3.53
    

    Also find deny from all and comment it in the entire file.

    Save and close the file.Restart Apache httpd server:

    # service httpd restart
    

    Edit: Since this is the selected answer and gets best visibility ... please also make sure that PHP is installed, otherwise you get same Forbidden error.

    0 讨论(0)
  • 2020-12-07 10:05

    With the latest version of phpmyadmin 5.0.2+ at least

    Check that the actual installation was completed correctly,

    Mine had been copied over into a sub folder on a linux machine rather that being at the

    /usr/share/phpmyadmin/
    
    0 讨论(0)
  • 2020-12-07 10:09

    The problem with the answer with the most votes is it doesn't explain the reasoning for the solution.

    For the lines Require ip 127.0.0.1, you should instead add the ip address of the host that plans to access phpMyAdmin from a browser. For example Require ip 192.168.0.100. The Require ip 127.0.0.1 allows localhost access to phpMyAdmin.

    Restart apache (httpd) after making changes. I would suggest testing on localhost, or using command line tools like curl to very a http GET works, and there is no other configuration issue.

    0 讨论(0)
  • 2020-12-07 10:10

    To allow from all:

    #Require ip 127.0.0.1
    #Require ip ::1
    Require all granted
    
    0 讨论(0)
提交回复
热议问题