My current CentOS 7 server is already running Apache web server 2.4x, using default ports 80 and 443. The Puppet Enterprise version 2019.x, using nginx(pe-nginx to be exact), is configured by default to use the exact same ports.
What needs to be changed to make pe-nginx web server use ports 8090 and 444 instead of the default 80 and 443?
According to: https://puppet.com/docs/pe/2019.0/config_console.html I should Disable the HTTPS redirect. Here were instructions I tried:
The pe-nginx webserver listens on port 80 by default. If you need to run your own service on port 80, you can disable the HTTPS redirect.
Edit your Hiera.yaml file to disable HTTP redirect.
puppet_enterprise::profile::console::proxy::http_redirect::enable_http_redirect: false
This is the modified file: /etc/puppetlabs/code/environments/production/hiera.yaml
---
version: 5
defaults:
# The default value for "datadir" is "data" under the same directory as the hiera.yaml
# file (this file)
# When specifying a datadir, make sure the directory exists.
# See https://puppet.com/docs/puppet/latest/environments_about.html for further details on environments.
# datadir: data
# data_hash: yaml_data
hierarchy:
- name: "Per-node data (yaml version)"
path: "nodes/%{::trusted.certname}.yaml"
- name: "Other YAML hierarchy levels"
paths:
- "common.yaml"
puppet_enterprise::profile::console::proxy::http_redirect::enable_http_redirect: false
I am new to yaml but can see that this is probably not right but tried it anyway.
It does not say what to do after changing the file to implement the change, this is what I tried:
puppet infrastructure configure --recover
Notice: Unable to recover PE configuration: The Lookup Configuration at '/etc/puppetlabs/code/environments/production/hiera.yaml' has wrong type, unrecognized key 'puppet_enterprise::profile::console::proxy::http_redirect::enable_http_redirect'
2019-05-07T15:41:29.722+00:00 - [Notice]: Compiled catalog for tadm10-adm.test.hfgs.net in environment enterprise in 2.08 seconds
2019-05-07T15:41:42.489+00:00 - [Notice]: Applied catalog in 12.05 seconds
netstat -tulpn | grep -v tcp6|grep ":443\|:80\|:8090\|:444"
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 32272/nginx: master