I have this section in a script:
cat <<EOF >> /etc/httpd/vhosts/$site$dom.conf
<VirtualHost *:80>
ServerName $site$dom
ServerAlias www.$site$dom
DocumentRoot /site/http/travel/itn
CustomLog logs/access_$site_log combined
DirectoryIndex default.php index.php index.html index.phtml index.cgi index.htm
ScriptAlias /awstats/ /usr/local/awstats/wwwroot/cgi-bin/
<Directory /site/http/travel/itn >
AllowOverride All
</Directory>
</VirtualHost>
EOF
On line: CustomLog logs/access_$site_log combined
It looks like the interpreter is treating it _logas part of the $ site variable. The $ site variable is a dynamic variable. How can i fix this? I tried to break out of "_" using _$site\_, but this does not work for me.
source
share