Skip to main content

How to create subdomain in tomcat server at EC2 Instance

If you want to create a subdomain for your website that is hosted on aws ec2 instance under tomcat 8 server. 

Step 1) First you have to create a "create record set" as i mentioned in below image suppoe i want to create a sub-domain under my website www.web-host-master.com like this products.web-host-master.com then you can enter your subdomain name in field of name. 
and then you have to select Type of record that is A -IPv4 Address. 
How to create subdomain in aws route 53.


then you have to enter your ec2 instance public /elastic ip address in value field. 

after enter click on save record set. 

Now logged into to your server by ssh like putty. access your server and go to tomcat8 installation directory 

in this you have to go conf/server.xml file and you have to edit this file by opening follwoing command. 

sudo vi server.xml file 

and you have to add these 2 lines under 
 <Engine name="Catalina" defaultHost="localhost">
<host appbase="products" autodeploy="true" name="product.web-host-master.com" unpackwars="true"></host>
      <!--For clustering, please take a look at documentation at:
          /docs/cluster-howto.html  (simple how to)
          /docs/config/cluster.html (reference documentation) -->
      <!--
      <Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/>
      -->

after adding this bold line code in your server.xml file take server restart by following command
sudo service tomcat8 start/restar/stop 

then you have to create a new folder under tomcat8 and copy your webapps folder under that you can put your ROOT or proejct.war file and rename this project folder as ROOT folder now you are able to access your domain name easly.

Comments

Popular posts from this blog

How do I change the time zone of my Amazon RDS database instance?

As we know bydefault time in the format of UTC in mysql.We can set local time zone to our AWS RDS Instance for our application. or any other time zone prefared Cloud Based Website Hosting Service Provider Steps 1: Go to Services and Select RDS Now to change time zone we have to change "Parameter Group" in left side that is associated with DB instance first we can check default Parameter Group for our instance is Parameter group default.mysql5.7  ( in-sync ) like this. So we have to change the time zone in this Parameter Group.  now open that parameter group (default.mysql5.7)  and click on edit parameter. then search for time_zone (because we want to change it.) then we have to change time_zone only by default it is engine-default (that is utc)  we have to select Asia/Calcutta.  More information we can ref.  https://aws.amazon.com/premiumsupport/knowledge-center/rds-change-time-zone/

Changing the Time Zone on Amazon Linux Ec2 Instance

Amazon Linux instances are set to the UTC (Coordinated Universal Time) time zone by default, but you may wish to change the time on an instance to the local time or to another time zone in your network. Important These procedures are intended for use with Amazon Linux. For more information about other distributions, see their specific documentation. To change the time zone on an instance Identify the time zone to use on the instance. The  /usr/share/zoneinfo  directory contains a hierarchy of time zone data files. Browse the directory structure at that location to find a file for your time zone. [ec2-user ~]$ ls /usr/share/zoneinfo Africa Chile GB Indian Mideast posixrules US America CST6CDT GB-Eire Iran MST PRC UTC Antarctica Cuba GMT iso3166.tab MST7MDT PST8PDT WET Arctic EET GMT0 Israel Navajo right W-SU ... Some of the entries at this location are directo

Digital Marketing

What actually is Digital Marketing? This post will help you understand the insights of Digital Marketing What is Digital Marketing? Digital Marketing is an integral part of the overall marketing strategies of any business. It basically covers the advertisement of products/services/business/brand via digital channels. The digital channels could be of any type like websites, search engines, social media, emails, SMS, and MMS. In case if you're using all these digital channels for the marketing, make sure to have all the statistics & workflow of your campaigns via marketing automation. What are the types of digital marketing? Well, there are 6 core digital marketing types: Search Engine Optimization (SEO) : Search Engine Optimization is nothing but a long-term process of improving your website rankings on search engine results pages (SERPs), which in turn has a wide range of tactics & strategies to implement. Although there is no specific method or a  spec