For excessively paranoid client authentication.
Organization & Common Name: Some human identifier for this server CA.
openssl genrsa -des3 -out ca.key 4096
openssl req -new -x509 -days 365 -key ca.key -out ca.crt
| #Check the below url | |
| #https://docs.mongodb.com/tutorials/install-mongodb-on-amazon/ | |
| #for ubuntu https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu/ | |
| Step 1: Configure the package management system (yum). | |
| Create a /etc/yum.repos.d/mongodb-org-3.6.repo file so that you can install MongoDB directly, using yum. | |
| For MongoDB 3.6 |
| #please follow this link | |
| #http://voidcanvas.com/create-ssl-https-server-in-nodejs/ |
For excessively paranoid client authentication.
Organization & Common Name: Some human identifier for this server CA.
openssl genrsa -des3 -out ca.key 4096
openssl req -new -x509 -days 365 -key ca.key -out ca.crt
| #https://www.digitalocean.com/community/tutorials/how-to-create-an-ssl-certificate-on-nginx-for-ubuntu-14-04 |
When hosting our web applications, we often have one public IP
address (i.e., an IP address visible to the outside world)
using which we want to host multiple web apps. For example, one
may wants to host three different web apps respectively for
example1.com, example2.com, and example1.com/images on
the same machine using a single IP address.
How can we do that? Well, the good news is Internet browsers
| ##MondoDB Setup | |
| #https://gist.github.com/mamun67/6b8a12e07184a00e543145d524e97bbd | |
| ##Virtualenv setup | |
| #https://gist.github.com/mamun67/4999678dc6ed7bce714c67eaacc58316 | |
| ##Bower Setup | |
| #We have run bower in sudo mode to do the installation correctly | |
| $sudo bower install --allow-root |
| 1.Connect to your instance using SSH. | |
| 2.Use the lsblk command to view your available disk devices and their mount points (if applicable) to help you determine the correct device name to use. | |
| [ec2-user ~]$ lsblk | |
| NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT | |
| xvdf 202:80 0 100G 0 disk | |
| xvda1 202:1 0 8G 0 disk / | |
| 3.Determine whether to create a file system on the volume. New volumes are raw block devices, and you must create a file system on them before you can mount and use them. Volumes that have been restored from snapshots likely have a file system on them already; if you create a new file system on top of an existing file system, the operation overwrites your data. Use the sudo file -s device command to list special information, such as file system type. |
The following will guide you through the process of installing Node.js on an AWS EC2 instance running Amazon Linux AMI 2016.09 - Release Notes
For this process I'll be using a t2.micro EC2 instance running Amazon Linux AMI (ami-d41d58a7). Once the EC2 instance is up-and-running, connect to your server via ssh
sudo yum update -y| #Create public and private key | |
| #private and public key will be generated | |
| $ ssh-keygen -f name | |
| #Create user | |
| $sudo adduser username --disabled-password | |
| # Change to the new user | |
| sudo su - username |
| var express = require("express"); | |
| var mongoose = require("mongoose"); | |
| var bodyParser = require("body-parser"); | |
| var encode = require('hashcode').hashCode; | |
| var path = require("path"); | |
| const HttpProxy = require('http-proxy'); | |
| const proxy = new HttpProxy(); | |