Welcome! Log In Create A New Profile

Advanced

phpmyadmin works on localhost but not locahost/phpmyadmin

Posted by iburnthings 
phpmyadmin works on localhost but not locahost/phpmyadmin
December 18, 2015 03:46AM
I have a working wordpress site on my ip address and I wanted to setup phpmyadmin on the server machine.

I could've sworn that when I had it set to
my.domain/phpmyadmin
I was able to access it from the internet by pointing it at my domain

Now that doesn't seem to be working.

I can ONLY access phpmyadmin if I change the server_name to localhost
If I try localhost/phpmyadmin (this also worked earlier today) it also doesn't work but localhost still does

I made sure I was sudo when I edited and saved
I've saved my /etc/nginx/sites-enabled/default
I'm restarting nginx after the changes


full config to come
Re: phpmyadmin works on localhost but not locahost/phpmyadmin
December 18, 2015 03:50AM
[CODE]
server {
listen 80;
server_name site.com;
root /var/www/site.com/public/;
index index.php index.html;
location / {
try_files $uri $uri/ =404;
}
error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /var/www/html;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
server {
listen 80;
server_name localhost;
root /usr/share/phpmyadmin/;
index index.php index.html;
location / {
try_files $uri $uri/ =404;
}
error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /var/www/html;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
[/CODE]
If I use localhost/phpmyadmin or localhost/phpmyadmin/ it is still accessible at localhost only
If I use site.com/phpmyadmin I cannot access phpmyadmin and localhost goes to site.com/
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 218
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready