I'm running into this problem trying to link my Godaddy domain with a AWS Elastic ip.I google it and got many documents on how to link a EC2 instance with a domain on Godaddy.I followed following steps :
1: I created a new Elastic ip, and mapped to my instance aws.
2: Edit godaddy A(Host) to point to this elastic ip.
But when i am pointing to my domain name i.e http://example.com it is showing my Jboss server console.I find and got that the war file name should be ROOT.war but i am running multiple application on same server so how can i point this domain to my specific application like "http://MyExample/index.jsp"
You can simply use any reverse proxy server like Nginx and create a configuration there to map the domain to the application running on the server.
Assuming your application is running on 127.0.0.1 at port 8081 on the server then nginx config would have something like
proxy_pass http://127.0.0.1:8081;
Use an application load balancer! Avoid NGINX for reverse proxying like a curse especially if you're going to down stream to an elastic load balancer that is fronting an elastic beanstalk.
Because you really should be removing your EC2 instance and running elastic beanstalks for your apps anyway :P
Related
Hi i have laravel app deployed with AWS Elastic Beanstalk.
I have domain on cloudflare, I created hosted zone in AWS Route 53 with A record which is alias to my Elastic Beanstalk env but if i want to access app with this domain it just doesnt work, if i create A record with EC2 ip associated with Elastic Beanstalk env everything works, but when autoscaling pops up this ip changes, I tried to point DNS with CNAME to .elasticbeanstalk domain associated with app but same result, anyone had similar problem?
I tried using dig mydomain and answer section gives me 2 ip addresses - typing both to browser lets me access application, but neither of those two are same as ec2 intance associated with Elastic Beanstalk env,
I also tried using DNS Checker online, seems like some DNS servers reads my domain as those two IP addresses from dig command, some DNS servers reads my domain as a combination of EC2 instance address + one of address displayed in dig command
Any idea what can cause this? Server works on amazon linux + nginx on which i used certbot to get SSL Certificates (all 80 port requests are pointed to 443 port which seems working - because after typing http://domain I get 301 redirect to https://) nginx -t tells that configuration of nginx is ok
The problem was lack of HTTPS listener in load balancer.
To resolve something like this:
Go to configuration
Find Load Balancer and Edit
Add Listener for 443 Port HTTPS and SSL certificate
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 am really struggling to get my basic website (literally just a template without any changes, just running ASP.NET) to work with HTTPS. I am using an Elastic Beanstalk environment to host the site, and the site EC2 virtual machine is behind a load balancer (classic).
I have followed the guide here
And believe I have everything configured correctly, however when I browse to https://www.playground.cloudy-skies.org/ or even the http:// version, I get a HTTP ERROR 503.
I have created an SSL certificate using AWS certificate manager:
I have the load balancer in AWS configured like so:
As per the website documentation, my domain name is pointing to the elastic beanstalk instance, not the load balancer. I've checked the AWS official doco and it says to do pretty much this. Where am I going wrong? if I browse the site with Fiddler active I get:
Please help? I'm a software developer more than I am a network guy, so I'm doing my best here but I'm struggling and have yet to successfully create a site that uses HTTPS.
First thing if you are using Beanstalk your Route 53 will be pointing to your Beanstalk Url only. You can change even force it your Loadblancer also but it doesn't make any change.
As your HTTPS (Port 443) is not working, just check the Security Group of EC2 instance and ELB (Elastic Load Balancer). Sometimes it happens Security Group block your Port.
So in Your Inbound Rules, (for both ELB and EC2) 443 port should be included
I have an Elastic Beanstalk environment with an SSL certificate that works if I visit the *.elasticbeanstalk.com URL (with a warning from by browser). For testing purposes I've mapped the IP of the instance to the domain in my hosts file before I change nameservers over. However when I try the actual URL with https:// I got ERR_CONNECTION_REFUSED from Chrome - http:// works fine though. I've flushed the DNS cache and I know DNS shouldn't care about application layer protocols - so I'm pretty stumped here. Any ideas?
HTTPS is disabled by default on new elastic beanstalk environments.
If it's a single server environment, you'd need to setup SSL yourself (documentation here).
If it's a load balanced one, simply enable the HTTPS protocol in the ElasticBeanstalk web console (Configuration => Network Tier => Load Balancing => Load Balancer)
I have 2 services running on AWS.
Lets say my domain is example.com
I run both of them through Elasticbeanstalk.
One is a single EC2 instance with a elastic IP setup and running on the apex - example.com and www.example.com which works correctly and i can access it.
The other one is a service that has a load balancer in front and i want it to be accessible through sockets.example.com which i cannot get to work.
I have the route 53 nameservers setup in namecheap.com from where i bought the domain.
Here is my whole setup:
EDIT:
I can get the URl from the alias target and open it in a browser for example or ping it. That works.
I have the loadbalancer setup to forward the traffic from 80 to 8080 where my sockets are because of the root access rights for attaching them with sockets i was unable to set them up on the lower ports such as 80. But i don't think thats the issue since i am running a node.js app and i can open a sample page if i go straight on the Alias target URL.
Did you set your ELB up as public or internal?