danie1cohen.nginx
NginX
Reusable setup for configuring Nginx (pronounced Engine-X).
Requirements
List any necessary pre-requisites that aren’t covered by Ansible or this role. For example, if the role uses the EC2 module, mention that the boto package is needed.
Role Variables
nginx_domain_name: yoursite
SSL
If you're setting up Nginx with HTTPS, you'll need to use these variables.
nginx_ports:
- 80
- "[::]:80"
- 443 default ssl
nginx_ssl: yes
nginx_force_https: yes
The role will look for a local file and place it in /etc/ssl for you.
nginx_ssl_cert: yoursite.crt
nginx_ssl_key: yoursite.key
If you prefer to use an existing file on the remote system instead of uploading a new one, you can specify these variables.
nginx_ssl_cert_path: /etc/ssl/certs/yoursite.crt
nginx_ssl_key_path: /etc/ssl/private/yoursite.key
Reverse Proxy
By default, this setup uses uwsgi_pass as the upstream component. If you'd like to use a different component, you can adjust the settings.
nginx_upstream_pass: proxy_pass
nginx_upstream_prefix: http://
nginx_socket: localhost:8000
License
BSD