Skip to content

Latest commit

 

History

History
79 lines (63 loc) · 1.5 KB

README.md

File metadata and controls

79 lines (63 loc) · 1.5 KB

To access server via ssh limit access to pem file

chmod 400 .ssh/filename.pem 

Connect to server through ssh

ssh -i .ssh/filename.pem ubuntu@servername

Download letsencript for free SSL

sudo git clone https://github.com/letsencrypt/letsencrypt /opt/letsencrypt

Fix

export LC_ALL="C"

Goto

cd /opt/letsencrypt

Run lets encript to generate ssl certificate for this domain

./letsencrypt-auto certonly --standalone --email [email protected] -d your.domain.com

To see files were created or not

sudo ls /etc/letsencrypt/live/your.domain.com

Prepare for server setup

cd ~
git clone https://bitbucket.org/behestee/awssh.git
cd awssh
If you need to switch to prior branch i.e. expressjs or other
git checkout <branchname> 

Execute Shell

chmod +x aws.sh
sudo ./aws.sh

It will create and configure your server, just you need to modify the vhost conf, Jenkins configuration and create your job at there. It also will install the mysql secure installation script and prompt you for give your settings.

Modify Domain Name as necessary

sudo vim  /etc/nginx/sites-available/nginx_vhost
sudo vim /etc/hosts

Restart nginx server

sudo service nginx restart

Know nginx status

sudo service nginx status

Get First Password for Jenkins and Configure for Project

sudo cat /var/lib/jenkins/secrets/initialAdminPassword