您好我想允许访问
wp-admin/admin-ajax.php
但拒绝访问
wp-admin/
请帮助我如何做到这一点。我目前的代码
location /wp-admin/ {
allow 127.0.0.1;
deny all;
}
退回位置代码
location @fallback {
proxy_pass http://127.0.0.1:8080;
proxy_redirect http://127.0.0.1:8080 /;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Port $server_port;
access_log off;
}
答案 0 :(得分:1)