-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnginx.conf
39 lines (32 loc) · 830 Bytes
/
nginx.conf
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
events {
worker_connections 1024;
}
http {
include mime.types;
sendfile on;
server {
listen 80;
listen [::]:80;
server_name _;
return 301 https://$host$request_uri;
}
server {
# listening port
listen 443 ssl;
listen [::]:443 ssl;
ssl_certificate /etc/nginx/certificate/nginx-certificate.crt;
ssl_certificate_key /etc/nginx/certificate/nginx.key;
resolver 127.0.0.1;
autoindex off;
server_name _;
server_tokens off;
# location of the doc root within the container
root /opt/mkdocs/site;
gzip_static on;
auth_basic "Restricted Content";
auth_basic_user_file /etc/nginx/.htpasswd;
location / {
try_files $uri $uri/ =404;
}
}
}