Jul 13

Use nginx config generator

wzuup nginx

There is a Config Generator for Nginx which uses YAML for configuration. It uses the same keywords (hopefully it does), but may be easier to maintain.

Install nginx_config_generator

$ sudo gem install nginx_config_generator

Generate a YAML example as template

$ generate_nginx_config ‐‐example >nginx.yml

Convert the yaml to nginx.conf

$ generate_nginx_config nginx.yml nginx.conf

Use -y to overwrite nginx.conf if already exists

$ generate_nginx_config nginx.yml nginx.conf -y
✱ ✱ ✱