-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdev-nginx.conf
34 lines (27 loc) · 1018 Bytes
/
dev-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
server {
listen 80;
listen [::]:80;
root /var/www/documentation;
index index.html;
include "/etc/nginx/cloudflare.conf"; # Get's the IP address from Cloudflare that is passed through by Fly!
rewrite ^/mkdocs.org/$ https://www.mkdocs.org/ permanent;
error_page 404 403 /404.html;
error_page 404 /404.html;
location = /404.html {
root /var/www/documentation;
internal;
}
location / {
include "/etc/nginx/deny.conf";
include "/etc/nginx/cloudflare.conf";
auth_basic "Documentation Login";
auth_basic_user_file /etc/nginx/.htpasswd;
}
location /healthz { # Setups the `/healthz` page
stub_status on; # Turns on the module designed to output status of the server
access_log off; # Do not log requests to this endpoint
allow 127.0.0.1; # Allows Localhost
allow 172.16.0.0/12; # Allow Consul to access the page
deny all; # Any one else gets put in the bin
}
}