Answer the question
In order to leave comments, you need to log in
Nginx + FPM = Why phpMyAdmin 403?
DigitalOcean, LEMP on Ubuntu 14.04, multiple Virtual Hosts. Everything works except phpMyAdmin.
Installed via PuTTY:
1 apt-get update
2 apt-get install phpmyadmin
3 ln -s /usr/share/phpmyadmin /usr/share/nginx/html
4 php5enmod mcrypt
5 sudo service php5-fpm restart
In response 403
Server default settings:
server {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;
root /usr/share/nginx/html;
index index.html index.htm;
server_name localhost;
location / {
try_files $uri $uri/ =404;
}
}
server {
listen 80;
listen [::]:80;
Answer the question
In order to leave comments, you need to log in
A person wants phpmyadmin to be like an alias in Apache, it's as old as the world
location ^~ /pma/ {
alias /usr/share/phpmyadmin/;
index index.php index.html;
location ~ /pma(/.*\.php) {
include fastcgi_params;
fastcgi_param SERVER_NAME localhost;
fastcgi_param SCRIPT_FILENAME /usr/share/phpmyadmin$1;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
}
}
Dudes use www.adminer.org Phpmayadmin is needed only to administer databases.
server {
listen 8080;
client_max_body_size 32m;
root /usr/share/phpmyadmin;
index index.php;
server_name phpmyadmin;
location / {
try_files $uri $uri/ =404;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php5-fpm.sock;
}
location ~ /\.ht {
deny all;
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question