First of all, backup the httpd.conf file with the following command:
cp /etc/httpd/conf/httpd.conf /etc/httpd/conf/httpd.bkup.ssl.1
The following command opens httpd.conf and searches for the term SSL:
vi +/SSL /etc/httpd/conf/httpd.conf
You should see the following lines with the prompt at SSL selected:
# # Use name-based virtual hosting. # #NameVirtualHost *:80 # # NOTE: NameVirtualHost cannot be used without a port specifier # (e.g. :80) if mod_ssl is being used, due to the nature of the # SSL protocol. #
Just move the cursor down and add following line after:
# SSL protocol. # RequestHeader set X_FORWARDED_PROTO 'https'
Opening and closing vi Editor
To quit the vi editor with saving the changes you made, hit ‘ESC’ key and type ‘ZZ’ (in caps) and it will save the changes and close the vi editor.
If you have made any mistake and want to quite without saving any changes, just hit ‘ESC’ key and type :q! and hit enter.
Hope that helps.