我正在使用 nginx 并希望将目录的访问权限限制为除我以外的所有人。我想访问 /restricted 中的 php 脚本。到目前为止,我已经尝试了一些东西。如果我记得,这可以阻止访问除允许的 IP 之外的所有内容,但所有脚本都被推送到下载而不是现在处理。
location ~ /restricted { allow 1.2.3.4; deny all; }
nginx
nginx ×1