Question

Error 403 Forbidden PHPMYADMIN

Posted May 24, 2021 241 views
NginxPHPUbuntu 20.04SQL

phpmyadmin after reset I get error 403 forbidden nginx/1.18.0 (Ubuntu), I have tried the solutions proposed in another post but they have not worked

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
Submit an Answer
1 answer

Hi @danielrebollar17,

There can be multiple reasons behind this issue, it can be due to your FireWall, your Nginx configuration or something with the phpMyAdmin application.

Let’s start with Nginx, please post your phpMyAdmin configuration file. Have you enabled it, have you reloaded Nginx after creating the file?

Next stop would be your Firewall, make sure whether you are using Iptables or ufw to have port 80 and 443 enabled. You can check if they are enabled using

ufw status

or

iptables -L

Regards,
KFSys

  • Nginx Configuration

    user www-data;
    worker_processes auto;
    pid /run/nginx.pid;
    include /etc/nginx/modules-enabled/*.conf;

    events {
    workerconnections 768;
    # multi
    accept on;
    }

    http {

        ##
        # Basic Settings
        ##
    
        sendfile on;
        tcp_nopush on;
        tcp_nodelay on;
        keepalive_timeout 65;
        types_hash_max_size 2048;
        # server_tokens off;
    
        # server_names_hash_bucket_size 64;
        # server_name_in_redirect off;
    
        include /etc/nginx/mime.types;
        default_type application/octet-stream;
    
        ##
        # SSL Settings
        ##
    
        ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3; # Dropping SSLv3, ref: POODLE
        ssl_prefer_server_ciphers on;
    
        ##
        # Logging Settings
        ##
    
        access_log /var/log/nginx/access.log;
        error_log /var/log/nginx/error.log;
    
        ##
        # Gzip Settings
        ##
    
        gzip on;
    
        # gzip_vary on;
        # gzip_proxied any;
        # gzip_comp_level 6;
        # gzip_buffers 16 8k;
        # gzip_http_version 1.1;
        # gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
    
        ##
        # Virtual Host Configs
        ##
    

    I have tried to restart Nginx but it does nothing, everything remains the same

    I don’t have ufw active, because otherwise I wouldn’t let people enter my server (it’s from a game)

    • Hi @danielrebollar17,

      As I can see you have provided me with the Nginx’s service configuration file rather than the phpMyAdmin’s nginx configuration file.

      Can you please check inside /etc/nginx/sites-enabled/? In there you should be able to see the Nginx file.