Skip to content
This repository has been archived by the owner on Jun 11, 2019. It is now read-only.

Unnecessary virtualhost file added on CentOS/Redhat systems #40

Open
minorOffense opened this issue Sep 11, 2013 · 1 comment
Open

Unnecessary virtualhost file added on CentOS/Redhat systems #40

minorOffense opened this issue Sep 11, 2013 · 1 comment

Comments

@minorOffense
Copy link

I've been trying to figure out why the apache::redhat class is included on centos/redhat systems. It defines an empty file which sets named hosts to work on port 80. In our case, we're deploying apache behind a proxy so we only want to listen on 8080. This file doesn't necessarily hurt anything but it add config when none is required.

https://github.com/example42/puppet-apache/blob/master/manifests/vhost.pp#L240

Which then loads this file

https://github.com/example42/puppet-apache/blob/master/templates/00-NameVirtualHost.conf.erb

I'd suggest just removing that line of code or that class altogether as it doesn't really do anything or respect config (i.e. port settings)

@alvagante
Copy link
Member

That's an old piece of code, as far as I remember it was used to provide a NameVirtualHost directive to ensure that the created vhosts could use it as there wasn't such a (needed) line in the RedHat default configs.
So I suppose that's why it was there.
The fact the port 80 is encoded makes it useless when using vhosts on different ports, so I suppose it must be better parametrized.
But I think it's still needed (haven't checked the effect of its removal on a real system, though).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants