amazon-elb

Rerouting all http traffic to https with AWS ELB

≡放荡痞女 提交于 2019-12-17 18:56:09
问题 So I've looked over the other similar questions and they offer solutions but none of them seem to work for some reason. So, for starters, my ELB is set up so that HTTP (incoming) -> HTTP (instance) HTTPS (incoming) -> HTTP (instance) So both traffic should come in on port 80. And this works, as when I access my site using http://mydomain.com or https://mydomain.com, it is able to display even though I only have a VirtualHost for on port 80. The issue is with attempting to rewrite all http

Configuring Load Balancer to Route to different pages of instance?

那年仲夏 提交于 2019-12-13 19:55:16
问题 I have an AWS load Balancer in front of instance x. Instance x runs on port 3000. Instance x has two pages i.e. x/abc and x/zyx. Currently the load balancer of x has two listeners i.e. 80 -> 3000 and 8080 -> 3000 . And ping on / Requirement : I has two servers that want to communicate to instance x. Server 1 wants to send http request to x/abc and server 2 wants to send http request to x/zyx. How can I configure the LB to route to particular pages e.g. x/abc and x/zyx? OR write my requests

Redirecting from Http to Https with AWS's ELB in Chrome and FireFox

匆匆过客 提交于 2019-12-13 17:19:03
问题 I have setup redirecting from http to https at AWS with ELB. The procedure is as follow. In the file .htaccess, put the following X-Forwarded-Proto code <VirtualHost *:80> RewriteEngine On RewriteCond %{HTTP:X-Forwarded-Proto} !https RewriteCond %{HTTP_USER_AGENT} !^ELB-HealthChecker RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301,NE] </VirtualHost> Then the .htaccess file is put inside the folder my website's index.php stays. I tested at Chrome, FireFox and Safari. Both Chrome and

Stop Elastic Load Balancer From Revealing Internal Private IP

☆樱花仙子☆ 提交于 2019-12-13 14:37:36
问题 It's come to my attention that the internal IP of ec2 instances behind an ELB, even when in a private subnet, are revealed when a particular type of request is issued. specifically one with an empty HOST value. telnet site_url 80 GET / HTTP/1.0 And the returned headers: HTTP/1.1 301 Moved Permanently Cache-Control: max-age=1209600 Content-Type: text/html; charset=iso-8859-1 Date: Thu, 26 Mar 2015 18:47:22 GMT Expires: Thu, 09 Apr 2015 18:47:22 GMT Location: https://10.0.7.35/ Server: Apache

How to query AWS to get ELB names and attached instances to that using python boto3 modules?

时光毁灭记忆、已成空白 提交于 2019-12-13 10:27:28
问题 I cant find code with boto3. I'm able to get elb name and InstanceID separately but cant link them together to find attached instances to ELB names. 回答1: Classic Load Balancer The boto3 describe_load_balancers() functions returns a list of instances: { 'LoadBalancerDescriptions': [ { 'LoadBalancerName': 'string', 'DNSName': 'string', .... 'Instances': [ { 'InstanceId': 'string' }, ], .... }, ], 'NextMarker': 'string' } The Instances section returns the IDs of the instances for the load

Golang HTTP server timeout

心已入冬 提交于 2019-12-13 02:25:20
问题 I'm trying to write a web server in golang to handle geocoding requests. Some of these requests take longer than a minute to process. In this case, the server seems to be returning an empty body to the client, though the handler keeps running. I've tried the code below to no avail. Am I missing something? Is it possible this is a problem with pat? r := pat.New() r.Get("/geocode", GeocodeHandler) r.Get("/status", StatusHandler) r.Get("/", InvalidHandler) s := &http.Server{ Addr: ":"+port,

PrimeFaces push with AWS

℡╲_俬逩灬. 提交于 2019-12-13 00:37:20
问题 I am using PrimeFaces 5.0 and tomcat 7 and my application is in AWS. I am trying to use PrimeFaces push. I have implemented a sample application and it is working with my local system. If i deploy the code to AWS it fails. Xhtml code <p:socket onMessage="jsFunctionToCall" channel="/service/push"/> Web.xml <filter> <filter-name>shiroFilter</filter-name> <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class> <init-param> <param-name>targetFilterLifecycle</param-name>

Installing SSL cert on Amazon EC2 ELB

元气小坏坏 提交于 2019-12-12 19:12:16
问题 I'm new to Amazon Web Services and have been trying to install a SSL certificate on the EC2 instance. I tried following AWS documentation, but found it baffling. I then followed the guide at http://www.robertbrewitz.com/2014/09/aws-and-setting-up-a-custom-ssl-certificate/. I bought my SSL cert with Go Daddy, and generated 2 files using openssl: server.key server.csr The guide said I should expect 3 certificates: DigiCertCA.crt TrustedRoot.crt star_yourdomain_com.crt Instead, I confusingly

Can I use Amazon ELB for my RDS instance for load balancing?

孤者浪人 提交于 2019-12-12 11:12:02
问题 I have two questions: Can I use ELB on my RDS instance for load balancing? Can I install multiple servers on EC2 instance and run single ELB instance for all servers? 回答1: 1-If you mean having only one RDS instance, there is no point in load balancing requests in front of it. If you mean having more than one RDS instance, it does not make much sense as well to load balance requests, because your database servers will most likely have different data in a given point of time. The only exception

AWS ALB redirect to https

纵饮孤独 提交于 2019-12-12 10:37:25
问题 My Apache servers are behind an ALB/ELB. I'm terminating SSL at the load balancer. The load balancer listens on both 80 and 443. I want to redirect all http requests to https. I have this rewrite rule in place in the vhost config: RewriteEngine On RewriteCond %{HTTP:X-Forwarded-Proto} =http RewriteRule .* https://%{HTTP:Host}%{REQUEST_URI} [L,R=permanent] This works, but the issue is that I also have redirects in an htaccess file. When a redirect happens through the htaccess file, it