I
Insight Horizon Media

How do I add a subdomain to a VPS?

Author

Emma Martin

Published Feb 24, 2026

How do I add a subdomain to a VPS?

Log in to the domain registrar account where the parent domain is registered. Edit the DNS entries for the domain. Create a host record for the first subdomain and assign the IP address of the first VPS. Do the same for the second subdomain.

How can I configure Tomcat with multiple virtual hosts?

Follow these steps:

  1. Update Server Configuration File. Open the server.xml file under the conf folder in Tomcat installation directory.
  2. Configure Host Name Resolution.
  3. Create Base Directory for the Virtual Host.
  4. Deploy the Java Web Application.

What is benefit of having virtual host in Apache Tomcat?

Virtual Host is in-built feature that allows to deploy multiple website(domains) in single instance of tomcat server. The main benefit in this way is its cost effective.

Can localhost have subdomains?

localhost is not supposed to have any subdomains. To do so violates the approved RFC standards. localhost has an A record and in IPv6 environments, an AAAA record.

What is Tomcat Virtual Host Manager?

Host Manager is a web application inside of Tomcat that creates/removes Virtual Hosts within Tomcat. A Virtual Host allows you to define multiple hostnames on a single server, so you can use the same server to handles requests to, for example, ren.myserver.com and stimpy.myserver.com .

How do I change my local host in Tomcat?

Answer

  1. Stop Apache Tomcat service.
  2. Go to your Apache Tomcat folder (for example C:\Program Files\Apache Software Foundation\Tomcat 7.0) and find file server.
  3. Modify the Connector port value from 8080″ to the one you want to assign to your web server.
  4. Save the file.
  5. Restart the Apache Tomcat service.

How do I point my domain to Tomcat Web application?

How to map a domain to Tomcat’s web application?

  1. Update nameservers at registrar if needed and add the domain to your control panel as either addon domain or parked domain.
  2. Map domain.com (use default mappings) to your application server using Java Control Panel.

What are Tomcat virtual hosts?

Tomcat – Virtual Hosts By default, Tomcat is configured with a single host named localhost, which allows Tomcat to send resources to clients from the host named localhost. Virtual hosts allows you to configure Tomcat to serve resources to clients from different hostnames. The cataline_home/conf/server.

How do I create a subdomain in localhost?

How to Create sub domains on localhost in apache on Ubuntu

  1. Create sub domain hosts. The hosts file on a linux system is used to map ip addresses to specific host names.
  2. Create your sub-domain document root directories.
  3. Now create virtual hosts in Apache configuration file.
  4. Test it.

Who is LVH?

is a free service that resolves itself along with all subdomains to localhost . There’s nothing to install or run. In fact, if you tried to visit that site it would fail unless you happened to have a local web app running on port 80. If you run host lvh.me you can see that it maps back to 127.0.

What should be the Tomcat admin port?

8080
By default, Tomcat is configured to listen on the following port numbers: Tomcat admin port: 8005. HTTP/1.1: 8080.

What does host manager do?

Manage and monitor your sites. Create custom hosting packages. Delete, create or even suspend your cPanel accounts. Access to look and change all of your DNS (Domain Name System) zones.

How do I add a virtual host to a Tomcat server?

Open the server.xml file under the conf folder in Tomcat installation directory. Scroll this file to the end, and you see a section that looks like this: Now, to add another virtual host to this server, copy all the XML code in the section and change the properties name and appBase.

How to host a web application in Tomcat using war?

Copy the web application’s WAR file to projectapp directory, and rename it to ROOT.war. Now, start the server. You will see Tomcat automatically unpacks the ROOT.war file to host the application. You now can access the application via this URL:

What does $Catalina_home mean in Tomcat?

Let’s also assume one instance of Tomcat running, so $CATALINA_HOME refers to wherever it’s installed, perhaps /usr/local/tomcat . Also, this how-to uses Unix-style path separators and commands; if you’re on Windows modify accordingly. At the simplest, edit the Engine portion of your server.xml file to look like this: