Skip to content

Instantly share code, notes, and snippets.

@Nitecon
Created March 31, 2023 17:23
Show Gist options
  • Save Nitecon/d7ffbcd6e442b2a42824ba3480d2bf84 to your computer and use it in GitHub Desktop.
Save Nitecon/d7ffbcd6e442b2a42824ba3480d2bf84 to your computer and use it in GitHub Desktop.
This vhost example is for use with golang text/template and exposes 2 variables to be replaced.
server {
listen 80;
server_name {{.Domain}};
root {{.VHOST_ROOT}};
index index.html index.htm;
location / {
try_files $uri $uri/ /index.html;
}
error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment