Welcome! Log In Create A New Profile

Advanced

nginx - deny all - dont work for specific directory

Posted by lakatusch 
nginx - deny all - dont work for specific directory
December 22, 2016 10:09AM
Hi all,

the server is running nginx.

The access to all files in /meins/mymail is possible, but why?

regards Daniel

This is my config:

====================================
server {

# SSL configuration
#
listen 443 ssl default_server;
listen [::]:443 ssl default_server;

ssl_certificate /etc/letsencrypt/live/www..de/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/www..de/privkey.pem;

root /var/www/www..de;

index index.html index.php index.htm ;

server_name www..de;

location ~* /meins/mymail/
{
deny all;
}


location ~ \.php$
{
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
}

location ~* \.(?:jpg|jpeg|gif|png|ico|cur|gz|svg|svgz|mp4|ogg|ogv|webm|htc)$
{
expires 1M;
access_log off;
add_header Cache-Control "public";
}

location ~* \.(?:css|js)$
{
expires 1m;
access_log off;
}

location ~* \.(?:ttf|ttc|otf|eot|woff|woff2)$
{
expires 1M;
access_log off;
}

location /images
{
try_files $uri $uri/;
}

location /deins
{
try_files $uri $uri/ ;
}

location /
{
rewrite ^/([^/\.]+)/*([^/]*)/*([^/\.]*)/*.*$ /main.php?kkk=$1&aaa=$2&bbb=$3 last;
rewrite ^.$ /main.php?kkk=Startseite last;
}

}
====================================
Sorry, only registered users may post in this forum.

Click here to login

Online Users

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