Welcome! Log In Create A New Profile

Advanced

php-file not protected

Posted by nephilim75 
php-file not protected
October 25, 2016 01:50PM
Hello

I have a basic authentication inserted to my nginx server config.

location / {
# This is cool because no php is touched for static content.
# include the "?$args" part so non-default permalinks doesn't break when using query string
try_files $uri $uri/ /index.php?$args;
auth_basic "Admin Login";
auth_basic_user_file /etc/nginx/pma_pass;

I thought I can't reach any file in my location without an authentication. But I have 2 files in /php sub directory. One is a *.txt file and the other one *.php. The *.txt is protected and the login popup is appearing but not for the *.php-file. It will be deliverd as it is designed for. I would like to have it protected the same way as the *.txt.

Any suggestions?

Kind regards
//neph



Edited 1 time(s). Last edit at 10/25/2016 01:50PM by nephilim75.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

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