Skip to content

Commit 063b3e5

Browse files
committed
mod_fcgid: style & doc
1 parent f7f1f03 commit 063b3e5

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

recipes/mod_fcgid.rb

+11-2
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,17 @@
2828
content '# conf is under mods-available/fcgid.conf - apache2 cookbook\n'
2929
end
3030

31-
if ((node['platform_family'] == 'rhel') && (node['platform_version'].to_i == 6)) ||
32-
((node['platform_family'] == 'fedora') && (node['platform_version'].to_i < 20))
31+
# CentOS 7 (and recent Fedoras) have Apache 2.4, where FCGI socket path
32+
# and shared memory path is managed adequately without further involvment
33+
# neccessary (subdirectory is created under /var/run/httpd).
34+
#
35+
# However, when the path is specified manually, that subdirectory is NOT
36+
# created automatically if it doesn't already exist and Apache fails to
37+
# start. Since in recent RHEL systems /var/run is on tmpfs, end result is
38+
# that chef-created subdirectory disappears on shutdown, and Apache fails
39+
# to start after server reboot. Best to leave out these two settings
40+
# unset then.
41+
if ((node['platform_family'] == 'rhel') && (node['platform_version'].to_i == 6))
3342
directory '/var/run/httpd/mod_fcgid' do
3443
owner node['apache']['user']
3544
group node['apache']['group']

templates/default/mods/fcgid.conf.erb

+1-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
IPCConnectTimeout 20
44
</IfModule>
55

6-
<% if ((node['platform_family'] == 'rhel') && (node['platform_version'].to_i == 6)) ||
7-
((node['platform_family'] == 'fedora') && (node['platform_version'].to_i < 20)) -%>
6+
<% if ((node['platform_family'] == 'rhel') && (node['platform_version'].to_i == 6)) -%>
87
# Sane place to put sockets and shared memory file
98
SocketPath run/mod_fcgid
109
SharememPath run/mod_fcgid/fcgid_shm

0 commit comments

Comments
 (0)