M
M
ML2016-05-12 11:08:38
Nginx
ML, 2016-05-12 11:08:38

How to block access to a specific directory?

There are web applications in php. Inside it there is a directory with js files. But they are implemented through nodeJs.
How to completely close access to this directory and the files in it.
After all, there are a lot of things in those files, for example, a connection to the database, and in general, there is no hunting somehow, so that everyone would know the architecture of my application.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Slava Kryvel, 2016-05-12
@staffID

https://httpd.apache.org/docs/2.4/mod/mod_authz_co...

<Directory /path/to/dir>
Require all denied
</Directory>

Closes access to the directory.

E
Evgeny Akhmetov, 2016-05-12
@asperin2

If Apache can still create .htaccess with contents deny from all
Nginx in config:
location /path {
deny all;
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question