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?
2011/11/18 16:53:29 [error] 3955#0: *1 directory index of "/srv/www/mysubdomain/" is forbidden, client: XX.XX.XXX.XXX, server: mysubdomain.domain.com, request: "GET / HTTP/1.1", host: "mysubdomain.domain.com"