Here is the redirect that will work. This should be valid for most apache setups on AWS, and then I will show you how to apply it to a Jenkins2 server.
Add this to your apache conf file:
RewriteEngine on RewriteCond %{HTTP:X-Forwarded-Proto} ^http$ RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
Then restart apache and you should have no problem after that.
To do this for Bitnami's implementation of Jenkins2 on AWS (this is the AWS Marketplace image), do the following:
- Add the above change to the top of: /opt/bitnami/apps/jenkins/conf/httpd-prefix.conf
- Restart apache:
sudo /opt/bitnami/ctlscript.sh restart apache
No comments:
Post a Comment