Welcome! Log In Create A New Profile

Advanced

Simple permissions problem

John Moore
July 16, 2009 09:33AM
Sorry, this should be dead simple but it's not working for me...

I have a directory, called 'php', within my main directory which
contains fragments of HTML to be included in my main pages (either by
SSI or by PHP includes). I do not want any of these fragments to be
directly accessible by a browser. That is, I want
'http://www.mysite.com/php/fragment.html' to fail.

I have the following in my nginx.conf, but it doesn't work -
'http://www.mysite.com/php/fragment.html' still brings up the fragment
in the browser. What do I need to do? (And, on a completely separate
note, do I have to specify the full path to the root in each of my
hosts, or is there some shortcut for this)?

server {
server_name www.mysite.com;
listen 80;

location /php {
root /var/www/nginx-default/www.mysite.com;
deny all;
}

}


JM
Subject Author Posted

Simple permissions problem

John Moore July 16, 2009 09:33AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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