Question

phpmyadmin downloads Django nginx SSL

I have been at it for hours. Tried every combination of info given on the net. phpmyadmin keeps downloading. I have done it 21 separate times. It is probably something minor that I am overlooking. Would love a fresh set of eyes.

server {
#    listen [::]:80
    server_name tellybro.com www.tellybro.com;

    location = /favicon.ico { access_log off; log_not_found off; }
    location /static/ {
        root /home/tellybro/TellyBro/src;
    }

   location / {
        include proxy_params;
        proxy_pass http://unix:/run/gunicorn.sock;
    }

  location ^~ /phpmyadmin {
#      root    /usr/share/phpmyadmin;
#      alias   /usr/share/phpmyadmin;
      alias    /var/wwww/html/phpmyadmin;
      try_files $uri $uri/ =404;
      index    index.php index.html index.htm;
  }

    location ~ \.php$ {
#        include snippets/fastcgi-php.conf;
#        fastcgi_pass unix:/run/php/php7.4-fpm.sock;
        try_files $uri =404;
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        fastcgi_pass unix:/var/run/php7.4-fpm.sock;
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        include fastcgi_params;
    }

    location ~ /\.ht {
        deny all;
    }

    listen 443 ssl; # managed by Certbot
    ssl_certificate /etc/letsencrypt/live/tellybro.com/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/tellybro.com/privkey.pem; # managed by Certbot
    include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot


}
server {
    if ($host = www.tellybro.com) {
        return 301 https://$host$request_uri;
    } # managed by Certbot

    if ($host = tellybro.com) {
        return 301 https://$host$request_uri;
    } # managed by Certbot


    listen 80;
    server_name 161.35.103.9 tellybro.com www.tellybro.com;
    return 404; # managed by Certbot




}

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Hi @KFSys, I have been at it for days and cannot solve this problem. Maybe there is another solution like going through a port or the ip address. I do not care as long as I can use phpmyadmin Ex: xx.xx.xx.xx:8080 or xx.xx.xx.xx:8080/phpmyadmin HELP

Hi @KDSys, thanks for answering. Yes, I did install PHP and I had phpmyadmin working until I went through the gunicorn, nginx, SSL Certificate through Certbot. I did have a conflict with port 80 because of gunicorn and I made Apache listen through 8080 as somebody said. Then gunicorn worked, nginx worked and I got the SSL Certificate. But when I went to continue my development I realized that phpmyadmin did not work. I ended up installing PHP 7.4.

Hi @raulwassermann,

This might be a dumb question but since you are using Django maybe you didn’t actually install PHP and phpMyAdmin does need PHP to run.

If you are not sure how to install it, you can follow this tutorial :

https://www.digitalocean.com/community/tutorials/how-to-install-linux-nginx-mysql-php-lemp-stack-in-ubuntu-16-04#step-3-install-php-for-processing

Regards, KDSys