Skip to content

Latest commit

 

History

History
37 lines (35 loc) · 2.6 KB

40-expose-web-app.md

File metadata and controls

37 lines (35 loc) · 2.6 KB

Exposing the web application to the internet

In this section, we will expose the web pages to the internet through a VPC load balancer so anyone can access them.

  1. Create a public load balancer to expose the web application. Access the Load balancers for VPC page and click Create.
  2. Set the following for the load balancer:
    • Load balancer type: Application Load Balancer (ALB)
    • Location: Location that you provision your VPC resources
    • Details:
      • Name: <initials>-web-lb
      • Virtual private cloud: <initials>-workload-vpc
      • Type: Public
      • DNS type: Public
      • Subnets: <initials>-workload-vsi-zone-1
    • Backend pool:
      • Name: <initials>-backend-pool
      • Pool protocol: HTTP
      • Health Port: 80
    • Click Attach server + in the Back-end pools section and add the VSI that is in the subnet <initials>-workload-vsi-zone-1 with a server port of 80
    • Create a front-end listener by clicking Create listener and set the following:
      • Listener port: 80
    • Under the Security Group section, unselect all except the one labeled <initials>-workload
    • Click Create load balancer
  3. Allow access to the load balancer by adding the following inbound rule to the security group called <initials>-workload that the load balancer is attached. Inbound security group rule
  4. Allow internet access to the load balancer by adding the following rules to the Access control list for the ACL <initials>-workload-acl.
    • Create an inbound rule ACL inbound rule
    • Create an outbound rule ACL outbound rule
  5. It can take several minutes for your load balancer to provision. Check and wait until the status is set to Active in Load balancers for VPC. You may need click the refresh button in the page periodically.
  6. You web application is exposed:
    • Retrieve the FQDN of your Load balancer
    • On your machine, open up a web browser pointing to http://<Hostname of your load balancer> . You may also test connectivity by issuing the following command: curl http://<Hostname of your load balancer>