A
A
Antiless2015-03-20 21:32:51
Nginx
Antiless, 2015-03-20 21:32:51

Where is the error in the config?

I want to access phpMyAdmin in the address bar via http:// pma/ , but I can't set it up. Tell me how to do this or where is my error in the config?
etc/hosts


127.0.0.1 localhost
127.0.0.1 pma

/etc/nginx/sites-available/pma (sim link available)
server {
  listen 127.0.0.1:80;
  client_max_body_size 1024m;
    	access_log on;

  location pma/ {               
         alias /usr/share/phpmyadmin/;
               index index.php index.html index.htm;
               location ~ ^phpmyadmin/(.+\.php)$ {
                       try_files $uri =404;
                       root /usr/share/;
                       fastcgi_pass 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/;
               }
        }
}

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
Rikcon, 2015-03-20
@Rikcon

nginx.org/ru/docs/http/server_names.html
Try this, I'm really not strong in nginx, but it should work.

C
Cool Admin, 2015-03-20
@ifaustrue

howitmake.ru/blog/ubuntu/93.html
I just saw in location pma/ { it seems like there is a slash on the other side, and alias /usr/share/phpmyadmin/; you need to change to root /usr/share/;
Well, to check, you can do listen on all interfaces, and not just on 127.0.0.1

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question