# Cant access phpmyadmin with LNMP setup

**URL:** <https://www.ruby-forum.com/t/cant-access-phpmyadmin-with-lnmp-setup/218208>\
**Category:** NGINX\
**Created:** [March 24, 2012, 3:46am UTC](https://www.ruby-forum.com/t/cant-access-phpmyadmin-with-lnmp-setup/218208 "2012-03-24T03:46:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![luislavena](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/0ea827/32.png) [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Post date:** [March 24, 2012, 3:46am UTC](https://www.ruby-forum.com/t/cant-access-phpmyadmin-with-lnmp-setup/218208/1 "2012-03-24T03:46:29Z")

</div>

I installed phpmyadmin in “/home/wwwroot/pma” and wordpress under  
“/home/wwwroot”  
but when I try to login to phpmyadmin, after i entered the password and  
username, it redirected me to my home page(which is served from  
wordpress)  
here is the screenshot of login similar to mine (except mine is in  
english) : [http://bbs.vpser.net/attachment.php?aid=826&noupdate=yes](http://bbs.vpser.net/attachment.php?aid=826&noupdate=yes)  
below is the rewrite rule for wordpress:

location / {  
if (-f $request\_filename/index.html){  
rewrite (._) $1/index.html break;  
}  
if (-f $request\_filename/index.php){  
rewrite (._) $1/index.php;  
}  
if (!-f $request\_filename){  
rewrite (.\*) /index.php;  
}  
}

can anyone help me and see what is wrong, really need phpmyadmin to  
manage the database. thank you

Posted at Nginx Forum:

> **[cant access phpmyadmin with LNMP setup](https://forum.nginx.org/read.php?2,224316,224316#msg-224316)**
>
> I installed phpmyadmin in "/home/wwwroot/pma" and wordpress under "/home/wwwroot" but when I try to login to phpmyadmin, after i entered the password and username, it redirected me to my home page(which is served from wordpress)...

---

<div class="post-metadata">

**Author:** ![rapwaydown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/57b2e6/32.png) [@rapwaydown](https://www.ruby-forum.com/u/rapwaydown)\
**Post date:** [March 24, 2012, 5:35am UTC](https://www.ruby-forum.com/t/cant-access-phpmyadmin-with-lnmp-setup/218208/2 "2012-03-24T05:35:51Z")

</div>

if i change the rewrite rule to the following, phpmyadmin will works  
fine, but then some of my wordpress url will stop working.  
location / {  
# This is cool because no php is touched for static  
content  
try\_files $uri $uri/ /index.php;  
}

Posted at Nginx Forum:

> **[Re: cant access phpmyadmin with LNMP setup](https://forum.nginx.org/read.php?2,224316,224317#msg-224317)**
>
> I installed phpmyadmin in "/home/wwwroot/pma" and wordpress under "/home/wwwroot" but when I try to login to phpmyadmin, after i entered the password and username, it redirected me to my home page(which is served from wordpress)...
