We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bdce133 commit dcf0a25Copy full SHA for dcf0a25
markdown-file/Nginx-Install-And-Settings.md
@@ -310,6 +310,27 @@ upgrade:
310
- 更新 `make upgrade`
311
312
313
+## 为 Nginx 添加 basic_auth
314
+
315
+```
316
+yum install httpd-tools
317
318
+htpasswd -c /opt/nginx-auth/passwd.db myusername,回车之后输入两次密码
319
320
321
+server {
322
+ ...
323
324
+ location / {
325
+ auth_basic "please input you user name and password";
326
+ auth_basic_user_file /opt/nginx-auth/passwd.db;
327
+ ....
328
+ }
329
+}
330
331
332
333
334
## Nginx 全局变量
335
336
- $arg_PARAMETER #这个变量包含GET请求中,如果有变量PARAMETER时的值。
0 commit comments