debops/ansible-nginx

skip redirect to ssl

pniederlag opened this issue · 4 comments

I am using debops and bootstrapped a single node from my local controll machine.
I have added some host_vars for a specific host in order to add another nginx config, see code below.
The created file for nginx still does redirect to the ssl site. Is there any way to disable this or maybe even another way to add a custom template file? Or, do you suggest to create a separate role? Would that simplify anything?


---
# List of nginx server definitions
nginx_servers: [ '{{ nginx_server_default }}', '{{ nginx_server_super }}']

# additional super nginx server
nginx_server_super:
  enabled: True
  type: 'php5'
  name: ['super.example.com']
  redirect_to_ssl: False

To disable default redirection to HTTPS version of the site, set item.ssl: False in the server configuration:

nginx_server_super:
  enabled: True
  type: 'php5'
  name: ['super.example.com']
  ssl: False

The item.redirect_to_ssl option can be used to generate a redirection from HTTP to HTTPS, but without the HTTPS version of the config added by the template, so that HTTPS version can be generated separately.

Thx for your pointer. Indeed it works to set xxx.ssl: False, but of course it does really disable SSL. For now I will just try to setup http first and check on the options for ssl later. My Wishlist:

  • keep http and https config in one file
  • have a chance to keep the config for http and https in a way that I can enforce ssl on special (sup-)paths only (typo3/*) ;)

Can you give an example of how that config would look like?

ypid commented

@pniederlag Does #76 address your issue?