Here’s what I did:
/var/www/html/drupal
The article in step 3 above said to use the ln
command to create a symlink like this:
sudo ln -s /usr/share/phpmyadmin /usr/share/nginx/html
But that didn’t work so I asked for help at the bottom of that tutorial and contributor “kamain7” suggested I create the symlink like this:
sudo ln -s /usr/share/phpmyadmin /var/www/html/drupal/phpmyadmin
But that didn’t work either and no one else has volunteered any other advice. Is it something with the symlink? Is their something odd with the Drupal on Ubuntu one-click application I am not aware of? Am I doing something wrong?
Please help.
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.
This question was answered by @zgurb:
@roro, @fubofo I found a solution finally, hopefully it works with you too.
Install phpmyadmin properly and add this lines to your /etc/nginx/sites-available/drupal file:
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; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ { root /usr/share/; } } location /phpMyAdmin { rewrite ^/* /phpmyadmin last; }
and restart php5-fpm and nginx.
service php5-fpm restart service nginx restart
here is my full nginx configuration page:
server { listen 80 default_server; listen [::]:80 default_server ipv6only=on; root /var/www/html/drupal; index index.php index.html index.htm; error_page 404 /404.html; error_page 500 502 503 504 /50x.html; location = /50x.html { root /usr/share/nginx/html; } location = /favicon.ico { log_not_found off; access_log off; } 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; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ { root /usr/share/; } } location /phpMyAdmin { rewrite ^/* /phpmyadmin last; } location = /robots.txt { allow all; log_not_found off; access_log off; } location ~ \..*/.*\.php$ { return 403; } location ~ ^/sites/.*/private/ { return 403; } location ~ (^|/)\. { return 403; } location / { try_files $uri @rewrite; } location @rewrite { rewrite ^ /index.php; } location ~ \.php$ { fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_param SCRIPT_FILENAME $request_filename; fastcgi_intercept_errors on; fastcgi_pass unix:/var/run/php5-fpm.sock; include fastcgi_params; } location ~ ^/sites/.*/files/styles/ { try_files $uri @rewrite; } location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ { expires max; log_not_found off; } }
@roro, @fubofo I found a solution finally, hopefully it works with you too.
Install phpmyadmin properly and add this lines to your /etc/nginx/sites-available/drupal file:
and restart php5-fpm and nginx.
here is my full nginx configuration page:
Thank you very much my friend. Greatly appreciated.
@zgurb I finally found time to try your solution and it worked! Thanks!
It’s been more than a month since I posted my original comment and I havenot found the solution and no one at Digital Ocean has fixed it or told me what I’m doing wrong. Very discouraging.
Also having this issue. Still haven’t found a fix
I have same problem and couldn’t find any solution. I tried everything but still getting 404 not found error.