We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Is it possible to add a vhost that expresses this idea using this module?
server { listen 80; server_name my.domain.com; return 301 https://$server_name$request_uri; }
The text was updated successfully, but these errors were encountered:
I think there's a rewrite_to_https option
Sorry, something went wrong.
Yup - if you use rewrite_to_https as such:
rewrite_to_https
nginx::resource::ghost{'my.domain.com': www_root => '/opt/html/', rewrite_to_https => true, ssl_cert => '...' << INSERT VALID SSL SETTINGS >> }
(Whatever your root might be) you end up with the following block (or the starts of server blocks):
server { listen *:80; server_name my.domain.com; if ($ssl_protocol = "") { return 301 https://$host$request_uri; } index index.html index.htm index.php;
and a second server block:
server { listen *:443 ssl; server_name myhost.com; ssl on;
... the module uses the "if ssl protocol" block rather than the direct return.
@ericrini if this addresses your issue please consider closing this, thanks!
No branches or pull requests
Is it possible to add a vhost that expresses this idea using this module?
The text was updated successfully, but these errors were encountered: