Permalink
Browse files

COOK-1026: fix error_log location on FreeBSD.

  • Loading branch information...
1 parent 722d306 commit 05937fda2baa8c8f7a0bac6b9001729f52947c16 @andreacampi andreacampi committed with jtimberman Feb 7, 2012
Showing with 6 additions and 1 deletion.
  1. +5 −0 apache2/attributes/default.rb
  2. +1 −1 apache2/templates/default/apache2.conf.erb
@@ -25,6 +25,7 @@
set[:apache][:package] = "httpd"
set[:apache][:dir] = "/etc/httpd"
set[:apache][:log_dir] = "/var/log/httpd"
+ set[:apache][:error_log] = "error.log"
set[:apache][:user] = "apache"
set[:apache][:group] = "apache"
set[:apache][:binary] = "/usr/sbin/httpd"
@@ -41,6 +42,7 @@
set[:apache][:package] = "apache2"
set[:apache][:dir] = "/etc/apache2"
set[:apache][:log_dir] = "/var/log/apache2"
+ set[:apache][:error_log] = "error.log"
set[:apache][:user] = "www-data"
set[:apache][:group] = "www-data"
set[:apache][:binary] = "/usr/sbin/apache2"
@@ -53,6 +55,7 @@
set[:apache][:package] = "apache"
set[:apache][:dir] = "/etc/httpd"
set[:apache][:log_dir] = "/var/log/httpd"
+ set[:apache][:error_log] = "error.log"
set[:apache][:user] = "http"
set[:apache][:group] = "http"
set[:apache][:binary] = "/usr/sbin/httpd"
@@ -65,6 +68,7 @@
set[:apache][:package] = "apache22"
set[:apache][:dir] = "/usr/local/etc/apache22"
set[:apache][:log_dir] = "/var/log"
+ set[:apache][:error_log] = "httpd-error.log"
set[:apache][:root_group] = "wheel"
set[:apache][:user] = "www"
set[:apache][:group] = "www"
@@ -77,6 +81,7 @@
else
set[:apache][:dir] = "/etc/apache2"
set[:apache][:log_dir] = "/var/log/apache2"
+ set[:apache][:error_log] = "error.log"
set[:apache][:user] = "www-data"
set[:apache][:group] = "www-data"
set[:apache][:binary] = "/usr/sbin/apache2"
@@ -129,7 +129,7 @@ HostnameLookups Off
# logged here. If you *do* define an error logfile for a <VirtualHost>
# container, that host's errors will be logged there and not here.
#
-ErrorLog <%= node[:apache][:log_dir] %>/error.log
+ErrorLog <%= node[:apache][:log_dir] %>/<%= node[:apache][:error_log] %>
#
# LogLevel: Control the number of messages logged to the error_log.

0 comments on commit 05937fd

Please sign in to comment.