Hello. I installed PhpMyAdmin on Ubuntu 12.04 VPS LEMP. I can access http://example.com/phpmyadmin but when i enter the User/Password it does not work - the login page is reloaded and the password gets deleted. Any idea on what’s wrong? Can anyone send me a working PhpMyadmin, Nginx and PHP5.5 config?
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!
The config that worked for me is that one. Note that the line fastcgi_pass could be different depending on how your php5-fpm is configured. I recommend you to try both unix:/var/run/php5-fpm.sock and 127.0.0.1:9000 values
server {
[...]
location /phpmyadmin {
root /usr/share/;
index index.php index.html index.htm;
location ~ ^/phpmyadmin/(.+\.php)$ {
try_files $uri =404;
root /usr/share/;
fastcgi_pass unix:/var/run/php5-fpm.sock; # or 127.0.0.1:9000
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include /etc/nginx/fastcgi_params;
}
location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
root /usr/share/;
}
}
location /phpMyAdmin {
rewrite ^/* /phpmyadmin last;
}
[...]
}
Source : https://www.howtoforge.com/running-phpmyadmin-on-nginx-lemp-on-debian-squeeze-ubuntu-11.04
This is my phpmyadmin working configuration with https,
server {
listen 443;
ssl on;
ssl_certificate /etc/nginx/ssl/server.crt;
ssl_certificate_key /etc/nginx/ssl/server.key;
server_name phpmyadmin.example.loc;
root /var/www/vhosts/pma/;
index index.php;
# set expiration of assets to MAX for caching
location ~* \.(ico|css|js)(\?[0-9]+)?$ {
expires max;
log_not_found off;
}
location ~* \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_split_path_info ^(.+\.php)(.*)$;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
}
-Make sure to put you root path -Make sure YOU HAVE CREATED the config file of phpmyadmin -if you don’t want https just change the port to 80 and remove the ssl part ssl on; ssl_certificate /etc/nginx/ssl/server.crt; ssl_certificate_key /etc/nginx/ssl/server.key;
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.