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

'server {' stanza #792

Closed
gerases opened this issue Apr 2, 2016 · 5 comments
Closed

'server {' stanza #792

gerases opened this issue Apr 2, 2016 · 5 comments

Comments

@gerases
Copy link
Contributor

gerases commented Apr 2, 2016

Hi,

It seems that the server { block is only included under this condition:

if (($listen_port + 0) != ($ssl_port + 0)) {
...

If therefore I don't want ssl at all, then doing this:

  nginx::resource::vhost { 'blah':
    listen_port   => 80,
    proxy         => 'http://localhost:8080',
  }

produces just:

location / {
...
}

But in that case nginx doesn't start with the error:

nginx: [emerg] "location" directive is not allowed here

Am I doing something wrong?

Thanks

@gerases
Copy link
Contributor Author

gerases commented Apr 2, 2016

Hmm, I can't quite reproduce that behavior anymore. Let's ignore this for now.

@0x9090
Copy link

0x9090 commented Apr 4, 2016

Also running into this issue. My config is,

class { 'nginx':
    manage_repo     => false,
    package_ensure  => 'latest',
  }
  nginx::resource::vhost { '###':
    listen_port => 443,
    proxy       => 'http://127.0.0.1:8080',
  }

The service running on 127.0.0.1:8080 is terminating TLS

@gerases
Copy link
Contributor Author

gerases commented Apr 4, 2016

What do you get with that configuration?

@gerases
Copy link
Contributor Author

gerases commented Apr 4, 2016

Don't include listen_port and it should work

@wyardley
Copy link
Collaborator

wyardley commented Oct 8, 2016

@gerases: If it's Ok, I'm going to close this one out.

@wyardley wyardley closed this as completed Oct 8, 2016
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

No branches or pull requests

3 participants