By Roger Rossi
Here’s what I did:
/var/www/html/drupalThe 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.
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!
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; } }
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.