Code Monkey home page Code Monkey logo

ansible-nginx-proxy's Introduction

ansible nginx-proxy

Build Status

This Role configures Nginx as Proxy for a single Site.

Some default Options are set.

You can change the default Index.html, simple put your index.html in

templates/index.html under youre Playbook.

and setup the Variable:

nginx_proxy_custom_index: index.html

Default options:

  # default for nginx-proxy site Config 
  nginx_proxy_pass: http://localhost:8080                 # 
  nginx_proxy_server_name: "{{ ansible_hostname }}"       # name of the Site 
  nginx_proxy_conf_name: site.conf                        # name of the conf fife 
  nginx_proxy_location: /                                 # listen on uri 
  nginx_proxy_disable_default: true                       # disable default page 
  nginx_proxy_ssl_proxy: false                            # Use SSL 
  nginx_proxy_http_port: 80                               # port to listen on 
  nginx_proxy_https_port: 443                             # port to listen on for https 
  nginx_proxy_logdir: /var/log/nginx                      # Folder where to put the Logs in 

  # defaults file for nginx-proxy                         # some cache config 
  nginx_proxy_max_temp_file_size: 0   
  nginx_proxy_connect_timeout: 90 
  nginx_proxy_send_timeout: 90 
  nginx_proxy_read_timeout: 90
  nginx_proxy_buffer_size: 4k 
  nginx_proxy_buffers: 8 32k 
  nginx_proxy_busy_buffers_size: 64k 
  nginx_proxy_temp_file_write_size: 64k 

  # nginx SSL Config <br>
  nginx_proxy_ssl_session_timeout:  5m                    # SSL Session Timeout 
  nginx_proxy_ssl_protocols: TLSv1 TLSv1.1 TLSv1.2        # TLS Versions 

Example Playbook

# non SSL
- hosts: all
  roles:
    - role: ypsman.nginx-proxy
      nginx_proxy_server_name: mysite.example.org         # Servername to listen on  
      nginx_proxy_pass: http://localhost:8080             # Site to proxy
      nginx_proxy_http_port: 1080                         # Example change of default port


# SSL example
- hosts: all
  roles:
    - role: ypsman.nginx-proxy
      nginx_proxy_ssl_proxy: true                         # Enable SSL
      nginx_proxy_ssl_cert: /etc/ssl/cert.crt             # Location ssl Cert File
      nginx_proxy_ssl_key: /etc/ssl/cert.key              # Location ssl key File
      nginx_proxy_server_name: mysite.example.org         # Servername to listen on  
      nginx_proxy_pass: http://localhost:8080             # Site to proxy

ansible-nginx-proxy's People

Contributors

ypsman avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.