-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnginx-basic-auth.conf
More file actions
61 lines (48 loc) · 1.04 KB
/
nginx-basic-auth.conf
File metadata and controls
61 lines (48 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
worker_processes ##WORKER_PROCESSES##;
error_log /dev/stdout info;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
access_log /dev/stdout;
server {
listen ##PORT##;
root /var/www/html;
index index.html;
server_tokens off; # disable the Server nginx header
server_name _; # all hostnames
client_max_body_size ##CLIENT_MAX_BODY_SIZE##;
include /etc/nginx/conf.d/*.conf;
gzip on;
gzip_disable "msie6";
gzip_comp_level 6;
gzip_min_length 1100;
gzip_buffers 16 8k;
gzip_proxied any;
gzip_types
text/plain
text/css
text/js
text/xml
text/javascript
application/javascript
application/x-javascript
application/json
application/xml
application/rss+xml
image/svg+xml;
location / {
try_files $uri $uri/ /index.html =404;
auth_basic "Restricted";
auth_basic_user_file /etc/nginx/.htpasswd;
}
}
server {
listen 8090;
location /nginx_status {
stub_status on;
access_log off;
}
}
}