Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redirect directly to https canonical domain #889

Merged
merged 1 commit into from Sep 18, 2017
Merged

Conversation

fullyint
Copy link
Contributor

Fixes https://discourse.roots.io/t/secure-non-secure-www-non-www-redirects/10420/2

http://www.xyz.com -> http://xyz.com -> https://xyz.com
becomes simply http://www.xyz.com -> https://xyz.com.

Also moves return 301 directive back into location block so that it will run only if acme challenge location is not matched. Otherwise Let's Encrypt validation in this server block fails due to redirect.

http://www.xyz.com -> http://xyz.com -> https://xyz.com
becomes simply http://www.xyz.com -> https://xyz.com
Also move return directive back into location block so that
it will run only if acme challenge location is not matched.
Otherwise Let's Encrypt validation in this server block would
fail due to 301 redirect.
@fullyint fullyint merged commit 12ac783 into master Sep 18, 2017
@fullyint fullyint deleted the redirects-streamlining branch September 18, 2017 18:12
HowardMei added a commit to HowardMei/dotrellis that referenced this pull request Oct 7, 2017
* 'master' of https://github.com/roots/trellis: (53 commits)
  Revert "Vagrant: Use DHCP by default"
  Vagrant: Use DHCP by default
  Extract package names from `apt` tasks into variables
  Remove `update_cache` parameter from `apt` tasks
  Normalize `apt` tasks and check package variables format
  Ansible 2.4 compatibility
  CHANGELOG updates
  Default h5bp expires and cache busting to false
  Remove WP transient _site_transient_theme_roots during deploys
  Deploys: Minimize delay in updating WP theme paths
  Fix multisite_subdomains Ruby compat
  Extract Trellis::Config (roots#890)
  Vagrant: Support DHCP
  Redirect directly to https canonical domain (roots#889)
  Ansible: Retry ssh connection one more time
  Re-enable IPv4 connections in Nginx no-default.conf (roots#885)
  Ensure updated H5BP nginx includes sync into place (roots#884)
  WordPress Setup: Add Nginx ssl_client_certificate (roots#869)
  Nginx: Include includes.d/http/*.conf
  Nginx: Add include.d files to redirect domains (roots#879)
  ...
primozcigler added a commit to primozcigler/trellis that referenced this pull request Nov 2, 2017
* trellis/master: (52 commits)
  Dynamically increase ansible_group_priority for selected env (roots#909)
  Bump Ansible version_tested_max to 2.4.1.0 (roots#911)
  Clarify DB task name.
  Update wp-cli to 1.4.0.
  Update placeholder deploy_build_before hook example [ci skip]
  Revert "Vagrant: Use DHCP by default"
  Vagrant: Use DHCP by default
  Extract package names from `apt` tasks into variables
  Remove `update_cache` parameter from `apt` tasks
  Normalize `apt` tasks and check package variables format
  Ansible 2.4 compatibility
  CHANGELOG updates
  Default h5bp expires and cache busting to false
  Remove WP transient _site_transient_theme_roots during deploys
  Deploys: Minimize delay in updating WP theme paths
  Fix multisite_subdomains Ruby compat
  Extract Trellis::Config (roots#890)
  Vagrant: Support DHCP
  Redirect directly to https canonical domain (roots#889)
  Ansible: Retry ssh connection one more time
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants