Welcome! Log In Create A New Profile


prevent public access to a config file

Posted by tkbeat78 
prevent public access to a config file
September 16, 2009 05:23AM

following problem : one of our servers is working with nginx .
in one folder there is a .htaccess which was usually designed to work with an apache webserver to prevent public access to subfolders and files . But in nginx the .htaccess isnt work correctly so that i can read a configfile in my browser if i know the correct path to it.

can anyone tell me how i can explizit prevent access to a file or a folder in the nginx conf or with the .htaccess file ?

The .htaccess file which isnt working :

Order deny,allow
Deny from all

I'd tried allready to chmod the configfile which i wanna try to hide from public access to 640 with the result that the whole php application did stopped working immidately.

best regards
Re: prevent public access to a config file
September 17, 2009 12:50PM
Please don't cross post.

Jim Ohlstein
Sorry, you can't reply to this topic. It has been closed.

Online Users

Guests: 189
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 494 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready