How can we help you today?

How to Unblock Requests to sql and Archive Files

Created by: Sophie van Vrijberghe de Coningh

Modified on: Fri, 19 Mar, 2021 at 3:42 PM


By default we block .sql files and archive files in Nginx. We do this to prevent accidental exposure. 

This is done by placing the following line in the Nginx configuration:

location ~ \.(sql|zip|tar|tar.gz|tgz)$ { deny all; }

Any requests to files with the extenstion sql, zip, tar, tar.gz or tgz will return with a HTTP 403 response.

How to Unblock Specific Files

If you want to host files with one of these extensions and make them downloadable, you can undo this block by placing the following line in your Nginx configuration (in a file called server.zip in /data/web/nginx/):

location = /some_directory/some_file.zip {}

Or if you want to unblock an entire directory, you can place the following Nginx configuration:

location ^~ /some_directory/ {}

Other variants of this Nginx configuration work as long as it’s more specific than the Nginx configuration that blocks these files (which can be found at the top of this article).

S
Sophie is the author of this solution article.

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.