Apache 2 virtual hosting

asked 2017-11-27 01:24:38 -0600

mulwa gravatar image

updated 2017-11-27 02:18:40 -0600

stivesso gravatar image

Hey, i have tried what you had suggested but still isn't working

node "puppetagent" {
include tomcat
include apache
include apache::mod::jk
}

iapache::vhost { 'tomcat.dddke.net':
  port    => '80',
  docroot => '/var/www/html',

}

apache::vhost { 'tomcat1.dddke.net':
  port    => '80',
  docroot => '/var/www/html',

}

apache::vhost { 'tomcat2.dddke.net':
  port    => '80',
  docroot => '/var/www/html',

}

apache::vhost { 'tomcat3.dddke.net':
  port    => '80',
  docroot => '/var/www/html',

}

apache::vhost { 'tomcat4.dddke.net':
  port    => '80',
  docroot => '/var/www/html',

}
class { '::apache::mod::jk':
  ip           => '54.172.8.127',
  workers_file => 'conf/workers.properties',
  mount_file   => 'conf/uriworkermap.properties',
  shm_file     => 'run/jk.shm',
  shm_size     => '50M',
$workers_file_content = {
  worker_lists   => ['status', 'some_name,other_name'],
  worker_mantain => '60',
  some_name      => {
    comment          => 'Optional comment',
    type             => 'ajp13',
    socket_keepalive => 'true',
  },
  other_name     => {
    comment          => 'I just like comments',
    type             => 'ajp12',
    socket_keepalive => 'false',
  },
}

class {'tomcat':
 service_ensure => 'running',
 service_enable => true
}


tomcat::instance { 'instance1':
 server_control_port => 8005,
 http_port           => 8080,
 ajp_connector       => 8009,
}

tomcat::instance { 'instance2':
 server_control_port => 8105,
 http_port           => 8081,
 ajp_connector       => 8109,
 manage_firewall     => true,
}

tomcat::instance { 'instance3':
 server_control_port => 8205,
 http_port           => 8082,
 ajp_connector       => 8209,

}
tomcat::instance { 'instance4':
 server_control_port => 8305,
 http_port           => 8083,
 ajp_connector       => 8309,

}

tomcat::instance { 'instance5':
 server_control_port => 8405,
 http_port           => 8084,
 ajp_connector       => 8409,

}
Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Could not parse for environment production: Syntax error at 'workers_file_content' at /etc/puppetlabs/code/environments/production/manifests/site.pp:42:1 on node puppetagent

when I test the same changes using the agent this is the error

edit retag flag offensive close merge delete

Comments

Hi Mulwa, That line: $workers_file_content = { It is the one I was referring to, why are you keeping this empty (and not closing the curly brace)? Please reply by adding a comment (not by adding answer or by creating a new thread...)

stivesso gravatar imagestivesso ( 2017-11-27 02:28:01 -0600 )edit

thanks a lot for your help

mulwa gravatar imagemulwa ( 2017-11-29 04:18:10 -0600 )edit

everything is now working

mulwa gravatar imagemulwa ( 2017-11-29 04:18:26 -0600 )edit

how can i mount it now? have a look at my main manifest.

mulwa gravatar imagemulwa ( 2017-11-29 04:19:16 -0600 )edit

Hi Mulwa, Glad to hear it is working, please go ahead and close this Issue now (You can upvote my answer above -hover the cursor over my answer and upvote- and mark this question as close). I see you've opened another thread for the mount, will have a look at that and see if I can be of any help..

stivesso gravatar imagestivesso ( 2017-11-29 04:44:59 -0600 )edit