By jeanmicheal
Hi,
I have installed PhpMyAdmin by following the guides here: https://www.digitalocean.com/community/articles/how-to-install-phpmyadmin-on-a-lemp-server
location /phpmyadmin { root /usr/share/; index index.php index.html index.htm; } location ~ ^/phpmyadmin/(.+.php)$ { try_files $uri =404; fastcgi_pass unix:/var/run/php5-fpm.sock; fastcgi_index index.php; include fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; }
location ~* ^/phpmyadmin/(.+.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ { root /usr/share/; } }
But when I navigate to example.com/phpmyadmin I get a blank page. I also get a blank page when navigating to example.com/phpmyadmin/index.php
Any help would be great.
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!
Hello, I think I have the solution for your problem, in step 3 you have the website file in /etc/nginx/sites-available. The file must be in sites-enabled, use: <br>ln -s etc/nginx/sites-available/example.com etc/nginx/sites-enabled/ <br>Take care.
@Sianios - I have already enabled sites-enabled. Both virtual host contains the same information. <br> <br>Here is the information in both /etc/nginx/sites-available/example.com and /etc/nginx/sites-enabled/example.com <br> <br>server { <br> listen 80; <br> <br> <br> root /var/www/example.com/public_html; <br> index index.php index.html index.htm; <br> <br> server_name example.com www.example.com; <br> <br> location / { <br> try_files $uri $uri/ /index.html /index.php; <br> autoindex on; <br> } <br> <br> error_page 404 /404.html; <br> <br> error_page 500 502 503 504 /50x.html; <br> location = /50x.html { <br> root /usr/share/nginx/www; <br> } <br> <br> # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 <br> location ~ .php$ { <br> try_files $uri =404; <br> fastcgi_pass unix:/var/run/php5-fpm.sock; <br> fastcgi_index index.php; <br> fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; <br> include fastcgi_params; <br> } <br> <br> location /phpmyadmin { <br> root /usr/share; <br> index index.php index.html index.htm; <br> } <br> location ~ ^/phpmyadmin/(.+.php)$ { <br> try_files $uri =404; <br> fastcgi_pass unix:/var/run/php5-fpm.sock; <br> fastcgi_index index.php; <br> include fastcgi_params; <br> fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; <br> } <br> location ~* ^/phpmyadmin/(.+.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ { <br> root /usr/share; <br> } <br>
Issue resolved. phpmyadmin now works. I changed the etc/nginx/sites-available/example.com <br> <br>and added the following lines: <br> <br> location /phpmyadmin { <br> root /usr/share/; <br> index index.php index.html index.htm; <br> location ~ ^/phpmyadmin/(.+.php)$ { <br> try_files $uri =404; <br> root /usr/share/; <br> fastcgi_pass unix:/var/run/php5-fpm.sock; <br> fastcgi_index index.php; <br> fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; <br> include fastcgi_params; <br> } <br> location ~* ^/phpmyadmin/(.+.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ { <br> root /usr/share/; <br> } <br> } <br> location /phpMyAdmin { <br> rewrite ^/* /phpmyadmin last; <br> } <br> <br> <br> <br>
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.