nginx_redirect

Practical Ansible Nginx redirect

Integration Quality Downloads Role

Define domain redirect on your Nginx. Useful when adding/removing from www. from URL, useful when your domain has multiple aliases.

Example: Remove www.

- name: Configure redirect to remove www from URL
  hosts: myhosts
  become: yes
  roles:
    - role: practical-ansible.nginx_redirect
      project_name: example
      server_names: www.example.com
      destination_domain: example.com
      status: 301

Example: Redirect subdomain to a URL

- name: Configure redirect to remove www from URL
  hosts: myhosts
  become: yes
  roles:
    - role: practical-ansible.nginx_redirect
      project_name: example
      server_names: marketing-campaign.example.com
      destination_url: example.com/landing-page
About

Define domain redirect on your Nginx

Install
ansible-galaxy install practical-ansible/nginx-redirect
GitHub repository
License
Unknown
Downloads
350
Owner
Tiny Ansible roles and playbooks that help you with web hosting in a world of VPS