nginx phpmyadmin 404
Posted
by
borannb
on Server Fault
See other posts from Server Fault
or by borannb
Published on 2011-11-18T15:25:47Z
Indexed on
2013/11/05
15:58 UTC
Read the original article
Hit count: 279
I am trying to install phpmyadmin on my nginx web server. I installed phpmyadmin without a problem. I created subdomain for it. For security reasons I didnt call my subdomain "phpmyadmin" i used a different name. Then I used this config for my subdomain
server {
listen 80;
server_name myphpmyadminsubdomain.domain.com;
access_log off;
error_log /srv/www/myphpmyadminsubdomain/error.log;
location / {
root /usr/share/phpmyadmin;
index index.php;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
include fastcgi_params;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
# fastcgi_intercept_errors on;
fastcgi_pass php;
}
location = /favicon.ico {
log_not_found off;
access_log off;
}
location = /robots.txt {
allow all;
log_not_found off;
access_log off;
}
location ~ /\. {
deny all;
access_log off;
log_not_found off;
}
}
Then I enabled it like this;
/etc/nginx/sites-available/myphpmyadminsubdomain /etc/nginx/sites-enabled/myphpmyadminsubdomain
I have restarted the nginx and go to myphpmyadminsubdomain.domain.com and it is giving me nginx 404 Not Found error.
what am I doing wrong?
© Server Fault or respective owner