apache - Chef set DocumentRoot in httpd recipe -
using https://community.opscode.com/cookbooks/httpd/versions/0.1.5
does know how set documentroot ? property ?
i'm using
httpd_service "default" listen_ports ['81'] action :create end
which produces
servername centos65x64 serverroot /etc/httpd pidfile /var/run/httpd/httpd.pid user apache group apache timeout 400 errorlog /var/log/httpd/error_log loglevel warn keepalive on maxkeepaliverequests 100 keepalivetimeout 5 defaulttype none hostnamelookups off listen 0.0.0.0:81 include conf.d/*.conf include conf.d/*.load
in httpd.conf, i'm not sure how set docroot.
the httpd_config
resource included in cookbook deploy httpd config file template httpd
instance's config directory, included when httpd
run. can configure virtualhosts or main server these templates opposed say, setting node attribute cookbook picks , generates virtualhost you.
this means can create erubis template virtualhost config. there of such config in cookbook tests...
<virtualhost *:81> serveradmin mike@patel.net documentroot /var/www customlog /var/log/apache/mike-patel-access.log combined <directory /> options followsymlinks allowoverride none </directory> <directory /var/www/> options indexes followsymlinks multiviews allowoverride none order allow,deny allow </directory> loglevel warn </virtualhost>
Comments
Post a Comment