【发布时间】:2017-12-27 23:36:59
【问题描述】:
我在互联网上找不到信息。
我正在尝试创建一个管理区域,但留下一个没有密码的 webhook(我使用 htpassword)但由于某种原因无法正常工作,可能与 laravel 的漂亮网址有关
这是有效的,资产是一个真正的文件夹
location /assets/ {
auth_basic off;
allow all;
}
这不起作用:
location /index.php/webhook {
auth_basic off;
allow all;
}
所以我添加了这个但也不起作用:
try_files $uri $uri/ /index.php?$query_string;
所以我用斜线结束了这个,location /index.php/webhook/ 但仍然没有。
供参考:
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name xxx.com;
auth_basic "Restricted Content";
auth_basic_user_file /etc/nginx/.htpasswd;
root /home/www;
#more configs like ssl#
location / {
limit_req zone=login burst=5 nodelay;
limit_req_status 503;
try_files $uri $uri/ /index.php?$query_string;
}
}
有什么想法吗? :)
【问题讨论】: