How Do You Make a Web UI Service Accessible to Outside Web Browser Traffic?

Problem scenario
Sometimes you have a web service listening on the loop back IP address on a non-standard port.

When you run nmap -Pn localhost, you see a service is listening on a given port (e.g., 9200). When you run nmap -Pn on an internal or external IP address, you do not see a service listening on that given port. You want to direct traffic to this listening service (e.g.,

 » Read more..

What is an Ingress Resource in Kubernetes?

Question
What is an Ingress resource in Kubernetes?

Answer
It is a Kubernetes technique of exposing services via an individual IP address (page 135 of Kubernetes in Action by Luksa). In TCP/IP networking, the Ingress port allows inbound traffic to route somewhere. Kubernetes supports other IP address to service mapping methods (e.g., NodePort or LoadBalancer). NodePort operates on layer 4 of the OSI seven-layer model (according to this posting).

 » Read more..

How Do You Install the Angular CLI on a Linux Server?

Problem scenario
You want to test out the Angular CLI on a Linux server. What should you do?

Solution

Prerequisite
Install node and npm. If you nsee assistance, see this posting How Do You Install node and npm on Any Distribution of Linux Server?.

Procedure
Run this command: sudo npm install -g @angular/cli

 » Read more..

How Do You Troubleshoot the ng Error “—–Mg: scratch (fundamental)—-All——————“?

Problem scenario
You run this command ng –version but you receive a blank screen at the terminal like this:

—–Mg: scratch (fundamental)—-All——————

What do you do?

Solution

1. Use “ctrl-z” to exit out.

2. Run these commands:

sudo apt remove ng-common
sudo npm uninstall -g @angular/cli
sudo npm install -g @angular/cli

3.

 » Read more..

How Do You Find the Port Number That GitLab’s Web UI Uses from the Back-end of a Linux Server?

Problem scenario
You have an existing GitLab set up on a Linux server. You have access to the back-end. You want to find the port number to connect to. How do you do this?

Solution
First find the external IP address (e.g., curl icanhazip)

Second, install nmap (e.g., sudo yum -y install nmap or sudo apt-get -y install nmap).

Three run this command (but replace x.x.x.x with the IP address found in the first step above):
nmap -Pn x.x.x.x | grep open

 » Read more..

How Do You Determine if HAProxy is up and Running or Not?

Problem scenario
You want to know if HAProxy is running or not. How do you determine its status?

Solution
Run this command: sudo /etc/init.d/haproxy status

 » Read more..

How Do You Set up Nginx as an HTTP Load Balancer for Other Instances of Nginx Running in Docker?

Problem scenario
You have many Docker containers running Nginx.  You want to leverage these instances for users to go to one web site and then be automatically routed to different underlying Nginx instances in Docker containers.  How do you create a single website for web clients to go to with a reverse proxy balancing the load behind-the-scenes?

Solution
Overview
We accomplish an example with four Docker containers each using a free version of Nginx. 

 » Read more..

How Do You Set up Nginx as an HTTP Load Balancer So Client Requests (from Web Browsers) Go to Certain Nginx Servers More Frequently Than Others?

Problem scenario
You have certain Nginx servers with ample resources whereas others have minimal resources.  Based on geographic locations and data center bandwidth locations and costs, you want to assign fractions of the web traffic from client workstations (requests from web browsers) to different Nginx servers more than others.  You do not want round-robin, equal distribution of traffic.  You want customized HTTP load balancing in accord with unequal configurations.  How do you distribute this traffic proportionately according to your desired specifications?

 » Read more..

Where Is The “Welcome to Nginx!” Page Stored in a Docker Container?

Problem scenario
You installed Nginx in a Docker container on a RedHat Linux server.  You go to this container with a web browser and see the default screen.  Where is the default file (on the back-end) that users see from the front-end by default that says “Welcome to nginx!”?

Solution
This is the name and location of the file (assuming the Docker container was created via the public repository):

/usr/share/nginx/html/index.html

 » Read more..

Which Log File Shows a Record of Web Traffic on an Nginx Web Server Running on a Linux?

Problem scenario
You configured Nginx on a Linux server. You want to see if there has been activity on the website (e.g., via a web browser). What log file, visible on the back-end, has records of web browsing activity?

Solution
It is often here: /var/log/nginx/access.log

For general Nginx purposes, the nginx.conf file specifies the location of the Nginx logs and the names of the log files themselves.

 » Read more..