httpd icon indicating copy to clipboard operation
httpd copied to clipboard

Allow empty instance name to configure the default `/etc/httpd` directory

Open tterrace opened this issue 8 years ago • 1 comments

Cookbook version

0.6.1

Chef-client version

12.x

Platform Details

RHEL

Scenario:

I'm upgrading a fleet of machines from 2.2 to 2.4 and in order to maintain compatibility with existing tools I'd like to keep the service name as "httpd", so all configuration would go in /etc/httpd/, and the init.d script would be /etc/init.d/httpd instead of /etc/init.d/httpd-<whatever>.

Judging by the following helper method that's used by httpd_service and httpd_config I don't think that's currently possible:

      def apache_name
        "httpd-#{instance}"
      end

Ideally I'd like something like this:


# installs default 2.4 in /etc/httpd
httpd_service do
  action "create"
end

# adds vhost config in /etc/httpd/conf.d
httpd_config "example" do
    instance ""
    source ...
    template ...
end

# drop off the wsgi.load in /etc/init.d/conf.modules.d
httpd_module "wsgi" do
    instance "" 
    action "create"
end

tterrace avatar Nov 08 '17 23:11 tterrace

This seems like it would be the default as well. It's not very clear in the documentation that its creating a separate process and config path httpd-default as the default instance. I'm not sure what the reasoning behind making it separate for a default install.

wahlstedtw avatar May 16 '18 19:05 wahlstedtw