updated nginx config
This commit is contained in:
parent
a5985a71cb
commit
ff2f10428d
@ -1,9 +1,11 @@
|
||||
server {
|
||||
listen 80 default_server;
|
||||
listen 443 ssl http2;
|
||||
server_name _;
|
||||
|
||||
ssl_certificate /ssl/crt/file.crt;
|
||||
ssl_certificate_key /ssl/key/file.key;
|
||||
|
||||
server_name site.com;
|
||||
|
||||
root /home/user/site.com;
|
||||
|
||||
@ -21,13 +23,13 @@ server {
|
||||
}
|
||||
|
||||
# Prevent Direct Access To Protected Folders
|
||||
location ~ /(app|bootstrap|config|database|resources|routes|storage|tests|artisan) {
|
||||
return 301 $scheme://$host$uri$is_args$args;
|
||||
location ~ ^/(app|bootstrap|config|database|resources|routes|storage|tests|artisan) {
|
||||
deny all;
|
||||
}
|
||||
|
||||
|
||||
# Prevent Direct Access To modules/vendor Folders Except Assets
|
||||
location ~ /(modules|vendor)\/(.*)\.((?!ico|gif|jpg|jpeg|png|js|css|less|sass|font|woff|woff2|eot|ttf|svg).)*$ {
|
||||
return 301 $scheme://$host$uri$is_args$args;
|
||||
location ~ ^/(modules|vendor)\/(.*)\.((?!ico|gif|jpg|jpeg|png|js|css|less|sass|font|woff|woff2|eot|ttf|svg).)*$ {
|
||||
deny all;
|
||||
}
|
||||
|
||||
location ~ \.php$ {
|
||||
|
Loading…
x
Reference in New Issue
Block a user