Skip to content

Instantly share code, notes, and snippets.

@elon01
Last active January 26, 2018 18:20
Show Gist options
  • Save elon01/d8a3f5010c683d26b9fb to your computer and use it in GitHub Desktop.
Save elon01/d8a3f5010c683d26b9fb to your computer and use it in GitHub Desktop.
custom.erb for Apache Configuration - Chef Fundamentals course (Online Edition)
# NOTE: The instructions are below in the Apache code, surrounded by hash (#) symbols.#
# When replacing instructions with a variable, remove the comments, including the hash symbols #
# Please remove these instructions too!#
<% if @port != 80 -%> #this line is an example of what to do below#
Listen <%= #put_port_variable_here# %> #the ruby evaluation tags are correct, but you need to put in the 'port' variable#
<% end -%>
<VirtualHost *:#put_port_variable_here# > #replace the 'port' variable, including ruby evaluation tags to print the value#
ServerAdmin webmaster@localhost
DocumentRoot #put_document_root_variable_here# #replace the 'document_root' variable, including ruby evaluation tags to print the value#
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory #put_document_root_variable_here# #replace the 'document_root' variable, including ruby evaluation tags to print the value#
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
</VirtualHost>
#DID YOU REMOVE ALL THE COMMENTS THAT START WITH A # SYMBOL? IF NOT, PLEASE GO BACK AN REMOVE *ALL* COMMENTS.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment