I would like to have script that is doing automated migrations of websites from another be able to append Includes to the /etc/httpd/conf.d/vhosts.conf file.
However, when I try to use echo to put append a string to the end of the file I get this:
$ sudo echo "Include thing" >> /etc/httpd/conf.d/vhosts.conf -bash: /etc/httpd/conf.d/vhosts.conf: Permission denied
and yet I can vi /etc/httpd/conf.d/vhosts.conf, add the line and :wq the file to save and close it.
What am I missing?