Welcome! Log In Create A New Profile

Advanced

Having a hard time with Nginx and PHP config..

Posted by wipeout_dude 
Having a hard time with Nginx and PHP config..
January 01, 2012 11:57AM
Hi,

I am having a hard time getting even basic functionality working so heaven help me when I have to try convert my actual sites..

I am migrating my ubuntu server from apache to nginx.. The first thing I have tried to do is get phpmyadmin working the same as it was in Apache..

In Apache I accessed it by http://localhost/adminmysql (ssh port mapping to localhost:80)..

First I tried this (not restricting to localhost just trying to get it to run)..

location /admin-mysql {
alias /usr/share/phpmyadmin/;
}

This worked for serving static files but wouldn't run php at all..

So I changed to a symlink in /usr/share/nginx/www from adminmysql->/usr/sharw/phpmyadmin
This worked to run phpmyadmin (Half way there!)..
Then I tried to implement restricting it to 127.0.0.1 using the following..

location /admin-mysql {
index index.php;
allow 127.0.0.1;
deny all;
}

This blocks the images and .html files but the php still runs so phpmyadmin still shows..

Don't know why such simple things are proving to be so complicated..

Please can someone help and point our where and why I am going wrong..

Thanks..
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 163
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