Question

phpmyadmin downloads Django nginx SSL

Posted June 15, 2020 198 views
Nginx

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




}
edited by MattIPv4

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.

×
3 answers

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

by Justin Ellingwood
The LEMP software stack is a group of software that can be used to serve dynamic web pages and web applications. This is an acronym that describes a Linux operating system, with an Nginx web server. The backend data is stored in the MySQL database and the dynamic processing...

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 @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

Submit an Answer