Guide To Setting Accessing PhpMyAdmin On NGINX, Ubuntu 11.04, EC2 Remote MySQL Instance
Posted
by
darkAsPitch
on Server Fault
See other posts from Server Fault
or by darkAsPitch
Published on 2011-06-24T09:18:51Z
Indexed on
2011/06/26
0:23 UTC
Read the original article
Hit count: 270
I have setup a domain name to run on amazon ec2 running ubuntu 11.04, nginx and php5-fpm.
The domain name works great, I have setup it's own sites-available configuration file and sym-linked it to sites-enabled.
I installed phpmyadmin via sudo apt-get install phpmyadmin and followed the instructions.
I then added this just above my /etc/nginx/nginx.conf file and restarted nginx.
server {
listen 80;
server_name phpmyadmin.domain.com;
location / {
root /usr/share/phpmyadmin;
index index.php;
}
#make sure all php files are processed by fast_cgi
location ~ \.php {
# try_files $uri =404;
fastcgi_index index.php;
fastcgi_pass 127.0.0.1:9000;
include fastcgi_params;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
}
I have also added the appropriate dns A records for phpmyadmin.domain.com
phpmyadmin.domain.com just shows a 404 error code. All other subdomains do not respond at all so at least something is working here.
FYI I have edited the /etc/phpmyadmin/config.inc.php file so that I can connect to a remote MySQL Database.
What else do I need to do?
© Server Fault or respective owner