Skip to content

Instantly share code, notes, and snippets.

@joltcan
Created November 10, 2017 09:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joltcan/8e10f215d7f3af38f786a4866efbfc61 to your computer and use it in GitHub Desktop.
Save joltcan/8e10f215d7f3af38f786a4866efbfc61 to your computer and use it in GitHub Desktop.
server {
listen 80;
listen 443;
server_name acme.int.<domain>;
if ($scheme = http) {
return 301 https://$server_name$request_uri;
}
include ssl-params.conf;
ssl_certificate /etc/openvpn/ca/keys/acme.int<domain>.crt;
ssl_certificate_key /etc/openvpn/ca/keys/acme.int.<domain>.key;
index index.html;
root /var/www/acme;
# basic IP check here, just in case
allow 127.0.0.1;
allow ::1;
allow 172.0.0.0/21; # all our local subnets
deny all;
location / {
try_files $uri $uri/ =404;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment