nginx vhost not configuring properly

asked 2016-04-27 06:10:11 -0600

rdoshi gravatar image

nginx::resource::vhost { 'service-set1-abc': server_name => ['start.sky.shoretel.com'],

ssl => true,

listen_port => '443',

sslcert => '/etc/nginx/shoretelrproxy_crt.crt',

sslkey => '/etc/nginx/shoretelrproxy_crt.key',

usedefaultlocation => false

}

nginx::resource::location { '/shoreauth/certauth':

proxy => 'https://ABC-servers$request_uri',

vhost => 'service-set1-abc',

proxysetheader => ['Host $host','X-Real-IP $remoteaddr','X-client-subject-dn $sslclientsdn'],

}

This is my init.pp file i tried configuring a vhost here.The file gets created but the content of the file is not proper

the file should be something like this

server {



location

{


} }

Instead it gets created like this

location

{


}

server

{


} How do i get the location inside the server brackets...what changes are needed in the pp file? Thanks in advance

Rahul

edit retag flag offensive close merge delete