How to setup two domain using Lamp or XAMPP AWS Linux 2

Suppose we need to create two domain with xampp Let say tutorialshore.com and viewshore.com

First we have to install xampp in your AWS Linux 2  see below link for that

How to install xampp and FTP in AWS Linux 2 server

Then folle below steps

1 Allow custom virtual hosts from Apache config


open Apache config file using below command

# vi /opt/lampp/etc/httpd.conf

 

Find out below code
# Virtual hosts
#Include etc/extra/httpd-vhosts.conf

Replace above code with 

# Virtual hosts
Include etc/extra/httpd-vhosts.conf

 

2) Add custom domain in the hosts file

#vi /etc/hosts


127.0.0.3	tutorialshore.com
127.0.0.5	viewshore.com



3) Add custom domain in the hosts file

#vi /etc/hosts
 
add this two host at the end

127.0.0.3	tutorialshore.com
127.0.0.5	viewshore.com

4) Create your virtual hosts

#vi /opt/lampp/etc/extra/httpd-vhosts.conf

Add below line at the end


<VirtualHost 127.0.0.3:80>
 DocumentRoot "/opt/lampp/htdocs/tutorialshore"
 DirectoryIndex index.php

 <Directory "/opt/lampp/htdocs/tutorialshore">
 Options All
 AllowOverride All
 Require all granted
 </Directory>
</VirtualHost>

<VirtualHost 127.0.0.5:80>
 DocumentRoot "/opt/lampp/htdocs/viewshore"
 DirectoryIndex index.php

 <Directory "/opt/lampp/htdocs/viewshore">
 Options All
 AllowOverride All
 Require all granted
 </Directory>
</VirtualHost>
  



5) Create project Directoty

#cd /opt/lampp/htdocs
#mkdir tutorialshore
#mkdir viewshore

6) Upload your files and enjoy with your two new website

how to renew let’s encrypt ssl certificate in centos using SSH command

Nowadays hacking is so simple,with out much technical extreme anybody can access other data,so it is important to encrypt the data when it exchange between the system,fortunately we have a standard security protocol called ssl to encrypt our data,among the ssl certificate let’s encrypt certificate is most popular and it is free.We can install Let’s encrypt ssl certificate in centos with easy ssh commands,but it will expire with 3 months to renew that we have to use let’s encrypt ssl certificate centos renew commands in ssh prompt,here we are finding out solution for the question “renew let’s encrypt ssl certificate centos”.

To obtain a new or tweaked let’s encrypt ssl certificate version of this certificate , simply run certbot.
To non-interactively renew *all* of your certificates, run
“certbot renew”


#certbot renew

renew let's encrypt ssl certificate centos

Install Certbot if any issue with above command please follow below steps

how to install let’s encrypt ssl certificate in centos using SSH command

How to push files to bitbucket from my windows system?

To upload files to bitbucket from your windows system ,first you need to install git and after have to clone repository to local device with clone git command ,it automatically create folder for you with all your server files.update changes and push your data .Here will discuss each steps

Lets see the steps

1) Download git for windows from https://www.google.co.in/search?q=install+git+on+windows&rlz=1C1CHZL_enIN773IN773&oq=install+git&aqs=chrome.1.69i57j0l5.2500j0j7&sourceid=chrome&ie=UTF-8

2) Install Git

3) Open cmd and try git status

#git

Git bitbucket from my windows system

4) move cmd directory to your project folder using #cd D:\newprojetc

5) Clone your bitbucket respository using below command

# git clone https://[email protected]/PROJECTNAME/RESPOSITORYNAME.git
auto create all your bitbucket files to your system newprojetc folder

6) update the files you needed and and commit using

#git git add .
#git commit -m “initial commit”

7) upload files using Push command

#gift push https://[email protected]/PROJECTNAME/RESPOSITORYNAME.git

uploaded files to bitbucket from yoursystem