-
-
Notifications
You must be signed in to change notification settings - Fork 875
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
How to implement return 301
and listen *:80 default
directives
#979
Comments
You can use With current version, you can just define the vhost once and define the |
I have been trying to create a similar server setting for a Confluence install. Puppetfile: mod "puppet/nginx", "0.6.0" Manual configuration: server {
listen 80 default_server;
server_name wiki.foo.lan;
return 301 https://$server_name/;
} Yaml for this module: nginx::nginx_servers:
'_':
ensure: 'present'
listen_options: 'default_server'
listen_port: 80
ssl: false
ssl_redirect: true
use_default_location: false Output from the yaml: $ cat _.conf
# MANAGED BY PUPPET
server {
listen *:80 default_server;
server_name _;
return 301 https://$host$request_uri;
access_log /var/log/nginx/_.access.log combined;
error_log /var/log/nginx/_.error.log;
} Hopefully the yaml example may help anyone else reading this ticket. Without the |
The url for vhost resource is changed in PR#980 to server resource https://github.com/voxpupuli/puppet-nginx/blob/master/manifests/resource/server.pp |
I'm going to close this; reopen if any more help is needed. |
Hi,
Just need to know how I can do the following with this module:
Load default site (no vhost found):
Redirect non-SSL with 301:
The text was updated successfully, but these errors were encountered: