Month: March 2019

IP Canonicalization in Nginx Http/Https

Nginx, SEO
IP Canonicalization in Nginx Http/Https: IP canonicalization is to redirect IP Address to the domain. This actually a part of SEO, so good to have IP canonicalization, but you can't achieve this using shared web hosting. IP Canonicalization in Nginx Http/Https: Add the below block to above of your default server block in your nginx conf file, which is default available in /etc/nginx/nginx.conf This below block works for both http and https IP canonicalization in nginx server. [code] server { listen *:80; listen *:443 ssl http2; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; ssl_certificate "/etc/letsencrypt/live/"; ssl_certificate_key "/etc/letsencrypt/live/"; server_name 18.218.X.X; return 301; } ...

Fix for AWS SSH Connection Hangs ?

Fix for AWS SSH Connection Hangs ? You could have not added the SSH TCP connection to your ec2 instance, thay may be creating this issue aws SSH connection Hangs issue. Follow the simple 3 steps to get away from this, 1. Login to AWS EC2 Console and click on Security Groups (available in the left sidebar). 2. Select your EC2 instance's security group then click on the Inbound tab. 3. Now add the SSH Rule like this to resolve this issue,

Steps to Increase AWS Disk Size

Steps to Increase AWS Disk Size 1. Login to AWS Console 2. Click EC2 and navigate to your currently running instances. 3. Click the instance and note down your Root device and Block Device 4. Click on Block Devices then click EBS ID to navigate to your volume page. In other way, you can directly click the volumes under Elastic Block Storage and reach the same page:   5. Click the Actions -> Modify Volume and Increase the size then click yes to confirm. 6. Login to your aws console through SSH and Run lsblk command and note down the volumn names Here, xvda is the recently changed volume size ` - xvdal previous size, 50G, we are trying to increase the size from 50GB to 80GB in this case.   If you run df -h now you will be able...

How to install MySQL in Docker ?

How to install MySQL in Docker ? Installing Particular Version [code] sudo docker pull mysql/mysql-server:5.7 [/code]   Installing Latest Version [code] sudo docker pull mysql [/code]   Running MySql Docker Image: [code] sudo docker run --name mysqlcname -e MYSQL_ROOT_PASSWORD=root -p 3306:3306 --restart always -d mysql [/code] -d => to start it automatically when the server started.     Docker useful commands for Beginners: You can also find other useful docker commands here.
Spring Boot Docker Deployment Steps

Spring Boot Docker Deployment Steps

Spring Boot Docker Deployment Steps Pre requisite: Install Java. [code] sudo yum install java-1.8.0 sudo yum remove java-1.7.0-openjdk [/code] Install Maven [code] sdk install maven [/code] Note: SDKMan can be used to install the maven. Spring Boot Jar - Docker Deployment Steps: Step 1: Create some folder in your linux machine.[create build folder inside /var] Step 2: Docker deployment file creation Create the below content as Dockerfile: [Filename: Dockerfile without any extension and must be available in "/var/build" path] [code] FROM openjdk:8-jdk-alpine VOLUME /tmp COPY yourjarname-1.0 yourjarname.jar ENTRYPOINT ["java","","-jar","/yourjarname.jar"] [/code] Here yourjarname-1.0 is assumed like the ...