I can access localhost/phpmyadmin but can't access www.project.com/phpmyadmin. 'www.project.com' is my virtual server. While trying to access www.project.com/phpmyadmin, it gave me 404 error. I've created symbolic link of phpmyadmin folder in root directory of virtual server.
I've mentioned location of /phpmyadmin on /etc/nginx/sites-available/project.com. 'project.com' is configuration file of nginx to add virtual server.
Here is the code of project.com
server {
listen *:80;
listen [::]:80;
root /home/dell/Projects/site/project;
index index.php index.html index.htm;
server_name www.project.*;
access_log /home/dell/Projects/site/project/logs/access.log;
error_log /home/dell/Projects/site/project/logs/error.log;
location /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/;
}
}
location /phpMyAdmin {
rewrite ^/* /phpmyadmin last;
}
location / {
try_files $uri $uri/ =404;
}
error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
location = /50x.html{}
location ~ \.php$ {
try_files $uri = 404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
}
}
Here is configuration of /etc/hosts file
127.0.0.1 localhost
127.0.1.1 dell-Inspiron-5423
127.0.1.1 www.project.com
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
I'm using ubuntu 14.04 version.
Do I need to configure config.inc.php? I viewed other similar post too but that didn't help.