Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

nginx - deny all - dont work for specific directory

$
0
0
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;
}

}
====================================

Viewing all articles
Browse latest Browse all 4759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>