I'm trying to create a nginx configuration file using a here-document with variable expansion. I use:
cat <<EOF > /etc/nginx/nginx.conf
settings
EOF
It works and expands the variables I need, but there are variables that need to be printed literally, so it's breaking my configuration file.
Example of lines I need to print literally:
limit_req_zone $binary_remote_addr zone=one:30m rate=20r/s;
try_files $uri =404;
How do I fix this issue?