目前我的配置文件(/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。有什么建议么?
如何通过远程连接导出 MongoDB 中的所有数据?我有我的 URI,但无法使用它在网上找到任何内容。
mongoexport --uri <URI> -f <output_file>
Run Code Online (Sandbox Code Playgroud)
当我指定一个集合时,此命令有效,但我不确定如何使用它导出所有集合。