How to change Puppet Enterprise web interface port so as not to conflict with my existing Apache web server
While I never could figure out how to accomplish this using Puppet Labs suggestion of modifying the hiera.yaml file I have figured out how to do this using the Web Console.
The modifications remove all conflicts with the existing Apache httpd that uses ports 80 and 443.
Access to the PE Web Console will now need to be accessed via port 444
This is the fix:
From the Web Console
- Select Configure
- Select Classification
- Select the + icon labeled "PE Infrastructure" production to display Classes
- Select PE Console production link
- Select Configuration tab
- Under "Classes" section - Add new class
- Select "puppet_enterprise::profile::console::proxy::http_redirect" from the list
- Select Add class button
- Select commit 1 change
- New class now shows on the page,
- Select parameter name: enable_http_redirect from the list
- Set value to false
- Add parameter
Select commit 1 change
Select parameter name: ssl_listen_port from the list
- Set value to 444
- Add parameter
- Select commit 1 change
When running puppet agent -t I now get an error as shown below
Duplicate declaration: Class[Puppet_enterprise::Profile::Console::Proxy::Http_redirect] is already declared; cannot redeclare (file: /opt/puppetlabs/puppet/modules/puppet_enterprise/manifests/profile/console/proxy.pp, line: 211)
Remove the duplicate declaration from proxy.pp
Edit: /opt/puppetlabs/puppet/modules/puppet_enterprise/manifests/profile/console/proxy.pp
#class { 'puppet_enterprise::profile::console::proxy::http_redirect' :# ssl_listen_port => Integer($ssl_listen_port),#}
Re-run puppet agent -t
puppet agent -t
Console Port(Port 443 change)
From the Web Console
- Configure
- Classification
- Select PE Infrastructure production
- Configuration tab
- Class: puppet_enterprise::profile::console
- Add Parameter
- Parameter Name: console_port
- Value: 444
Run puppet agent -t and check ports
# puppet agent -t# netstat -tulpn | grep -v tcp6|grep ":443\|:80\|:8090\|:444"tcp 0 0 0.0.0.0:444 0.0.0.0:* LISTEN 11182/nginx: master
Start httpd
# systemctl start httpd# netstat -tulpn | grep -v tcp6|grep ":443\|:80\|:8090\|:444"tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 13353/httpd tcp 0 0 0.0.0.0:443 0.0.0.0:* LISTEN 13353/httpd tcp 0 0 0.0.0.0:444 0.0.0.0:* LISTEN 11182/nginx: master
Accessing the PE Wen Console is now via port 444
https://hostname:444/#/inspect/overview