Repository URL to install this package:
|
Version:
1.0.0b1 ▾
|
doc:
short_help: Create a Nginx server block configuration file for a static site.
help: |
TODO: documentation, examples
references:
blog post: https://medium.com/@jgefroh/a-guide-to-using-nginx-for-static-websites-d96a9d034940
args:
hostname:
doc:
short_help: The domain name the webserver should listen on.
type: string
required: false
default: localhost
use_https:
doc:
short_help: Whether to use https (and request a letsencrypt certificate).
type: boolean
required: false
default: false
document_root:
doc:
short_help: The document root.
type: string
required: false
default: /var/www/html
# webserver_user:
# doc:
# short_help: The webserver user.
# type: string
# required: false
gzip_enabled:
doc:
short_help: Whether to enable gzip.
type: boolean
required: false
default: true
cli:
param_decls:
- --gzip-enabled/--gzip-disabled
index:
doc:
short_help: The index file name(s).
type: list
schema:
type: string
default:
- index.html
- index.htm
required: false
cli:
metavar: FILENAME
show_default: true
server_admin:
doc:
short_help: The server admin email.
type: string
required: false
cli:
metavar: EMAIL
frecklets:
- nginx-server-block-file:
path: "/etc/nginx/sites-enabled/{{:: hostname ::}}.{{:: 'https' if use_https else 'http' ::}}.conf"
owner: root
document_root: '{{:: document_root ::}}'
server_admin: '{{:: server_admin ::}}'
server_names:
- '{{:: hostname ::}}'
gzip_enabled: '{{:: gzip_enabled ::}}'
use_https: '{{:: use_https ::}}'
index: '{{:: index ::}}'
location_blocks:
- location_match: /
properties: |
meta: {}