AWS Opsworks, Spring mvc: Unable to open my application on browser - aws-opsworks

I have deployed my application using AWS Opsworks. I could see that my application has been deployed successfully, however I am not able to open it in a browser. I tried many many combinations of url, but no luck.
On my localhost, I access my application with this url:
http://localhost:8080/app/login.
In opsworks my app name is "bootshop" and it has been deployed successfully.
Now how do i access my login page ???
I tried below urls:
login page: http://xx.xx.xx.xx:8080/bootshop/app/login - 404 Requested resource not available
index.html page: http://xx.xx.xx.xx:8080/bootshop/app/ - 404 Requested resource not available
http://xx.xx.xx.xx:8080/bootshop/login - 404 Requested resource not available
http://xx.xx.xx.xx:8080/bootshop/ - Nothing is displayed on
http://xx.xx.xx.xx - Forbidden
For my EC2 instance, I have custom TCP rule set.. which allows traffic on port 8080 from anywhere.
Your help would be really appreciated.
Thank you

The 8080 address is the internal address that Apache web server uses to communicate with the Tomcat instance. The public address that you should use is 80. Just use the root path of your server to access the application, like this:
http://xx.xx.xx.xx
where xx.xx.xx.xx is your IP address. You can of course use the DNS name if you have any for that IP address.
Make sure that you allow HTTP traffic to port 80 in the security group for the EC2 instance where the application is running.

Related

Netlify and ngrok linking

I have a front-end deployed on Netlify and a back-end is deployed on localhost which is exposed using ngrok.
Is it possible to link them so that when I click on the Netlify link, it would send request to my localhost server exposed from ngrok ?
Netify can proxy to a dynamic backend, that is an intended use case. The problem we'll have is using "localhost" - netlify needs a valid hostname to connect to. So, if your ngrok is exposed (not firewalled) at some public IP, you can put that into your redirects configuration:
/backend-stuff-in-this-path/* https://1.2.3.4/:splat 200!
will send all requests to the path /backend-stuff-in-this-path/ANYTHING to the server at 1.2.3.4/ANYTHING
This may not be incredibly useful since your machine will change IP addresses sometimes one presumes, but if you were using localhost anyway, you weren't planning to put it in production quite yet. Note that redirects are deploy-specific, so you do need to redeploy to change the location if your IP changes.

GoDaddy domain in AWS with SSL for Wordpress application Issue

Currently, I am working on a Wordpress application and I am using AWS hosting. My domain is in GoDaddy.com and I have deployed the application in elastic beanstalk. I have created load balancer and also I need to run the application through HTTPS.
I have done my research and I think I found the right way, but it's not working for HTTPS. when I browse on HTTP on port 80, it runs well. Now I am helpless.
Here's what I have done so far:
1) I created a hosted zone on AWS Route 53 for the domain named "example.com". There are two records are created, NS and SOA.
2) Then, in GoDaddy, I added NS records from AWS as Custom Nameservers.
3) After that, I created A record for the domain in the AWS hosted zone, set ALIAS targeted to the Load Balancer of the Elastic Beanstalk environment.
4) Then, I changed the SITE URL from the wp_options table the wordpress application database.
After doing up to this, my application was running in HTTP. But as I want to change it to HTTPS. So,
1) I requested a certificate from AWS Certificate Manager and created CNAME (provided by ACM after requesting certificate) record in the hosted zone.
2) After the certificate is issued, I edited the listener from EC2 >> Load Balancer >> Listener and changed the protocol from HTTP to HTTPS and also allowed port on Security groups.
3) Also, I changed, the SITE URL from WordPress database and changed it from "http://example.com" to "https://example.com" but it was not working.
4) So I went to Elastic Beanstalk >> Configuration >> Load Balancer and added listener. After the environment is saved and restarted, still, the site was not running on HTTPS [ HTTP 408 ERROR IS SHOWN ]. But if I change SITE URL to "http://example.com", it works
I have found a solution, which says to use RedirectURL and set it to server config but I don't want to do that.
I also found this solution which suggest to Export Zone File and import it to AWS hosted zone. But whenever I click Export Zone File(Unix), the file downloaded is shown empty. I tried this for other accounts, still, this problem exists. So I did not do that.
Sorry for the long story, but I really need this help.
I have solved the issue.
In my load balancer port configuration, I previously set load Balancer port 443 and instance 443. here what I need to do is to call the load balancer on port 443 and backend make the backend call on port 80 and enable https on WordPress.
So I kept load balancer port 443 and changed the instance port to 80. After that, on the browser, there was too many redirects error shown. So then what I needed to do is that add $_SERVER['HTTPS'] = 'on' on wp-config. And then everything was running smoothly.
I hope this will help if some

Deploying my website to the pulic using IIS and windows server

I recently bought a domain. Let's say my domain is "domain.com", and I made a website in visual web dev. using ASP.NET and VB.NET. I also have an old computer that I turned into a home server so I installed windows server 2008 R2 SP2. So I uploaded my website to a folder and went to the IIS manager. There I added a website, set the sitename to "domain.com" application pool to "ASP.NET v4.0". Then the physical path to: "c:\websites\wwwroot\domain.com" then in the bindings I added 3 different things.
type hostname port IP adress
http www.domain.com 80 my IP found at www.what'smyip.com
http domain.com 80 my IP found at www.what'smyip.com
http *blank* 80 192.168.1.6(my server's internal IP)
I made sure port 80 is open in my router and I added a firewall inbound rule for port 80.
When I connect using 192.168.1.6 I get my website and everthing works like it should.
However when I connect using domain.com or www.domain.com I see a 404 page. http://prntscr.com/42ynf4
Also when I change my bindings and I change the IP for domain.com and www.domain.com like displayed below:
type hostname port IP adress
http www.domain.com 80 192.168.1.6(my server's internal IP)
http domain.com 80 192.168.1.6(my server's internal IP)
http *blank* 80 192.168.1.6(my server's internal IP)
It works just like it's supposed to?
I have done a DNSlookup on the domain and it's active. I'm a little bit stuck on this and I know you guys aren't experts on hosting but you all probably have more knowledge about this then I do.
You should check what is the server IP address (netstat), because you could use a proxy and then the Internet IP info will be not correct.
Also, make sure that you set the correct home page in IIS.

website Hosted on Ec2 not responding, what happened with My instance?

On Friday I hosted a WordPress site on my micro instance - I installed LAMP stack, and WordPress on it.
Instance state is Running, but when I try to access website with public domain given in console, it says
web page Not available
I have set an Outbound rule to allow everyone and Inbound rule for my IP address only.
This is about accessing website from outside world, but when I try to connect to my instance with JAVA Interface, MindTerm Web SSH, it says
Network connection timeout error
Can't figure out anything, Just started working on AWS.
I think you have confused the Outbound and Inbound rules - Outbound means traffic going out from the server, while Inbound means traffic from the internet to the server.
As you say, you added an Inbound rule for your IP address only, and you can access the website from you IP only, just like you requested.
Add an Inbound rule for port 80 for0.0.0.0/0, and you should be able to access the site from other locations as well.
If you need to open it to HTTP and SSH, open it for both for 0.0.0.0/0:
Please verify your settings and permission based on this :
http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/TroubleshootingInstancesConnecting.html
You might also want to check your firewall, in case that is blocking the access..

Proxy + HTTPS = Page doesn't load

I've developed a web app, which uses HTTPS and which works fine when I access is it (live). Yet some customers, who use proxy servers, can't access the site. I already tried to use a real certificate (a cheap one and only a trial, but yet valid), but that didn't help.
Everytime one of these users tries to access the site the browser tries to load it until a timeout occurs. One user even was shown an authentication (but I'm not 100% sure if this was due to a proxy, still waiting for response from the customer)
For which reasons can this happen and what can I do about it?
I'm using IIS, ASP.NET (C#) and JS. Sideinfo: The URL contains a port, the internal structure of the network the IIS is running in (not mine) doesn't allow it otherwise.
443 is dedicated port for HTTPS connectivity. Add type 'HTTPS' with default port 443 in Site bindings of hosted site directory. Check after whether SSL is enabled or not? in IE(browser)->Tools->Internet options->Advanced->Security.
If the HTTPS port in your web app's URL isn't port 443, you'll have a problem with corporate proxies that don't like non-standard HTTPS ports.
i.e. I hope your URL looks something like this: http://example.com:443/...

Resources