小编Sam*_*rma的帖子

Nginx 限制对文件的访问

目前我的配置文件(/etc/nginx/sites-available/default)说

server {
    listen 80 default_server;
    listen [::]:80 default_server;

    root /var/www/html;

    # Add index.php to the list if you are using PHP
    index index.html index.htm index.nginx-debian.html;

    server_name _;

    location /credentials.js {
                deny all;
                return 404;
        }

    location / {
        # First attempt to serve request as file, then
        # as directory, then fall back to displaying a 404.
        try_files $uri $uri/ =404;
    }

}
Run Code Online (Sandbox Code Playgroud)

但我仍然可以通过 example.com/credentials.js 从网络访问credentials.js。有什么建议么?

ubuntu nginx

4
推荐指数
1
解决办法
2万
查看次数

如何使用 URI 导出数据库中的所有集合?

如何通过远程连接导出 MongoDB 中的所有数据?我有我的 URI,但无法使用它在网上找到任何内容。

mongoexport --uri <URI> -f <output_file>
Run Code Online (Sandbox Code Playgroud)

当我指定一个集合时,此命令有效,但我不确定如何使用它导出所有集合。

mongodb nosql

3
推荐指数
1
解决办法
3890
查看次数

标签 统计

mongodb ×1

nginx ×1

nosql ×1

ubuntu ×1