I am running a single instance machine behind a load balancer and I am able to setup the secure port domain to work for https://www.example.com.
I am trying to redirect both http://www.example.com to https://www.example.com
I am running Tomcat 8 on the instance behind the load balancer
I was toying around with AWS extensions to make the redirect work and I used the following links for my reference to create a .ebextensions directory.
Redirect Http Url to Https in Elastic beanstalk loadbalancer
I dont see the .ebextensions directory after deployment in the tomcat root folder
The content on elasticbeanstalk.conf doesnt include the rewrite rules and module reloads that I added to make the redirect work .It still seems to contain the default values the file had before deployment. Seems the .ebextensions didnt get executed at all
I have installed an AWS certificate manager on my load balancer.
I am able to manually access https://www.example.com
Cant figure out if I am missing something? Can someone in the community help me resolve the issues.
Related
I have a .net core application which was earlier hosted on aws with ssl and load balancer. But in order to avoid load balancer I found that ssl will also not work without load balancer. As an alternative for SSL certificate I created a folder in root folder - .ebextensions and a config file inside it.
The problem is when I am publishing it to aws via elasticbeanstalk then the .ebextensions is not included in the source bundle and therefore ssl certificate is not working. Is there any way I can include this folder or any alternative way to get ssl certificate without load balancer. Please advice.
This is a very small thing which I ignored. Just change the Build Action of config file from None to Content will allow the folder and file to be copied. Empty folder not included while publishing. Thanks #Marcin and #Sridhar Raju for all the help
I have java 8 tomcat application deployed on Elastic Beanstalk on AWS. My initial design was that blog (WordPress) would be on same server as tomcat. But since this is Elastic Beanstalk, I moved by blog to a different EC2 (a different IP address). The blog works after I set up subdomain in Route53 as blog.syz.com. But I want to divert the traffic from xyz.com/blog to blog.xyz.com.
I am doing this by modifying .htaccess file.
I added a .htaccess file in the root of tomcat application and deployed to Elastic Beanstalk. But the redirect is not working.
To test, I tried changing the path of existing and do a redirect using .htaccess, but does not seem to take affect. Re started server but still not working.
What am I missing here?
Do I have to configure using .ebextension in Elastic Beanstalk?
Normally .htaccess in root folder should work.
I'm working on this site that I'm hosting with AWS. I'm hosting a vue.js frontend in an S3 bucket and the backend utilizes Spring Boot hosted with Elastic Beanstalk and a MySQL RDS instance. After playing around some, I got the frontend to serve up files via HTTPS, but now my requests to the Spring API are failing.
I've done a lot of digging on this and it seems that are may be several ways to handle this, but I just keep getting stuck and not knowing where to turn next. I've tried playing around with setting up a load balancer, and also tried configuring a proxy in a .ebextensions configuration file.
This whole thing was working when I set it up with HTTP originally, but now that the front-end is serving up HTTPS it won't work.
Web browsers must be blocking your mixed HTTP/HTTPs content because of their inbuilt security. You need to make sure that you setup the whole site using HTTPs or HTTP. As you have already set up the S3 content to be served through HTTPs, now you must configure your Elastic Beanstalk environment to be setup with HTTPs too. Here is the link to help you with that
Configuring HTTPS for Your Elastic Beanstalk Environment
If your site is built with a CRM? (WordPress/Joomla/ect.) then there are plugins/extensions that handle that. I had a similar situation with a WordPress site, and used the plug-in called "SSL Insecure Content Fixer". Worked without a hitch, rather than scanning through the entire site for mixed HTTP/HTTPs content.
Can anyone help me with a sample .ebextension file which adds a 301 redirect to IIS on a load balanced environment via Elastic Beanstalk?
I want to redirect a simple URL such as:
example.com/solutions/
to:
example.com/what-we-do/
We have an ebextension which tells IIS to serve over https, but nowhere can I find an example of someone trying to add a simple 301 redirect for one page to another page to IIS via Elastic Beanstalk.
(https redirect from AWS: https://github.com/awslabs/elastic-beanstalk-samples/blob/master/configuration-files/aws-provided/security-configuration/https-redirect/dotnet/https-redirect-load-balanced-dotnet.config for info)
Using Amazon's Guide, I created an Elastic Beanstalk application for a Wordpress/Woocommerce app. The EB domain contains a region, i.e., my-app.us-east-N.elasticbeanstalk.com. I followed the guide for using my own host (mysite.com), which I have set up on Route 53.
Whenever I hit mysite.com, I get a 301 redirect to my-app.us-east-N.elasticbeanstalk.com. I simply am using the A Alias record for mysite.com to point to that EB domain, exactly as in their guide. How do I stop it from redirecting? I dont want to use the EB domain, I want to use mysite.com to load the content coming from the EB domain. I havent yet found any AWS docs that explain this, the directions for doing what I want are incredibly simple (but dont seem to work).
There is nothing in default AWS Elastic Beanstalk setup that would cause such redirect. You should check if it is your app that is sending the redirect (especially since the Wordpress is known to force the redirect to its default/configured site URL).