Answer the question
In order to leave comments, you need to log in
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
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
nginx.org/ru/docs/http/server_names.html
Try this, I'm really not strong in nginx, but it should work.
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 questionAsk a Question
731 491 924 answers to any question