0

I'm making a basic installation script (my first to be precise) for LAMP, and I experienced some difficulties:

I trying to put some configuration in a new file, in this case for ssl-params

My humble code:

cat > /etc/apache2/conf-available/ssl-params.conf << ENDOFFILE
SSLCipherSuite EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH
SSLProtocol All -SSLv2 -SSLv3 -TLSv1 -TLSv1.1
SSLHonorCipherOrder On
Header always set X-Frame-Options DENY
Header always set X-Content-Type-Options nosniff
SSLCompression off
SSLUseStapling on
SSLStaplingCache "shmcb:logs/stapling-cache(150000)"
SSLSessionTickets Off
ENDOFFILE;

And my humble output:

warning: here-document at line 90 delimited by end-of-file (wanted `ENDOFFILE')

I'm curious what I can do differently

1
  • 2
    Use just ENDOFFILE, not ENDOFFILE; on the new line. Commented May 20, 2022 at 13:05

1 Answer 1

1

When using the heredoc syntax, you need to both open and close the multi-line text with the heredoc delimiter. The error message gives you the hint:

warning: here-document at line 90 delimited by end-of-file (wanted 'ENDOFFILE')

You opened your string with ENDOFFILE but closed it with ENDOFFILE;.

Try this instead:

cat > /etc/apache2/conf-available/ssl-params.conf << ENDOFFILE
SSLCipherSuite EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH
SSLProtocol All -SSLv2 -SSLv3 -TLSv1 -TLSv1.1
SSLHonorCipherOrder On
Header always set X-Frame-Options DENY
Header always set X-Content-Type-Options nosniff
SSLCompression off
SSLUseStapling on
SSLStaplingCache "shmcb:logs/stapling-cache(150000)"
SSLSessionTickets Off
ENDOFFILE
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.