DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Please enter at least three characters to search
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Last call! Secure your stack and shape the future! Help dev teams across the globe navigate their software supply chain security challenges.

Modernize your data layer. Learn how to design cloud-native database architectures to meet the evolving demands of AI and GenAI workloads.

Releasing software shouldn't be stressful or risky. Learn how to leverage progressive delivery techniques to ensure safer deployments.

Avoid machine learning mistakes and boost model performance! Discover key ML patterns, anti-patterns, data strategies, and more.

Related

  • Deploy Spring Boot Apps From Jar to War
  • JMeter Plugin HTTP Simple Table Server (STS) In-Depth
  • Optimizing Database Connectivity: A Comparative Analysis of Tomcat JDBC vs. HikariCP
  • Deployment of Spring MVC App on a Local Tomcat Server

Trending

  • Mastering Fluent Bit: Installing and Configuring Fluent Bit on Kubernetes (Part 3)
  • Why High-Performance AI/ML Is Essential in Modern Cybersecurity
  • Unlocking the Benefits of a Private API in AWS API Gateway
  • AI Meets Vector Databases: Redefining Data Retrieval in the Age of Intelligence
  1. DZone
  2. Coding
  3. Languages
  4. Deploying A WAR File in EasyApache 4 and Tomcat (Experimental)

Deploying A WAR File in EasyApache 4 and Tomcat (Experimental)

A quick, step-by-step tutorial on how to work with EasyApache 4 and Tomcat to create and deploy a web application housed in a WAR file.

By 
Md Nasir Uddin Bhuiyan user avatar
Md Nasir Uddin Bhuiyan
·
Oct. 01, 18 · Tutorial
Likes (1)
Comment
Save
Tweet
Share
18.2K Views

Join the DZone community and get the full member experience.

Join For Free

Recently EasyApache 4 started to provide Tomcat support on an experimental basis. After migrating from EasyApache 3 to EasyApache 4 it becomes very difficult and confusing for users to deploy and configure their web application (.war) in their VPS server. I also faced the same problem. Below are the short instructions on how I solved the problem.

First of all, you need to read below documents.

  • https://documentation.cpanel.net/display/EA4/Tomcat

  • https://httpd.apache.org/docs/current/mod/mod_proxy_ajp.html

Now follow the below instructions.

1) Build your web app - let's go with a .war file for example purposes. Rename it to ROOT.war.

2) In your VPS server go to the /home/user-name/ea-tomcat85/webapps location

3) Copy your ROOT.war file into the location (Step 2)

4) Go to /home/user-name/ea-tomcat85/conf file. There you should find a server.xml file.

5) Use the command vi server.xml to view the server.xml file. Find the Ajp/1.3 connector port. It should look something like this:

<Connector port="10001" protocol="AJP/1.3" redirectPort="10002"/>

Remember the port number is 10001.

6) Now go to this location: /etc/apache2/conf.d/userdata/std/2/user-name/your-domain-name/

Now create a file named custom.conf.

Write the below code:

<IfModule proxy_ajp_module>

ProxyPass "/" "ajp://127.0.0.1:HERE_YOUR_REMEMBERED_AJP_PORT/"

</IfModule>

Finally, save it.

This gives your website HTTP access.

7) Now got to the following location: /etc/apache2/conf.d/userdata/ssl/2/user-name/your-domain-name/

Create a file named custom.conf.

Write the below code:

<IfModule proxy_ajp_module>

ProxyPass "/" "ajp://127.0.0.1:HERE_YOUR_REMEMBERED_AJP_PORT/"

</IfModule>

Finally, save it.

This gives your server HTTPS access

8) Now you need to rebuild the HTTPD, so use the below command

/usr/local/cpanel/scripts/rebuildhttpdconf

And now restart the HTTPD by using the below command:

/usr/local/cpanel/scripts/restartsrv_httpd

Note: In case your website is not working yet, follow the below instructions.

Reboot your VPS server or do the same thing but in a new Tomcat location, which is /opt/cpanel/ea-tomcat85.

After doing everything, use the below command to start a Tomcat server manually:

/opt/cpanel/ea-tomcat85/bin/./startup.sh

If you need to shutdown Tomcat manually, use the below command:

/opt/cpanel/ea-tomcat85/bin/./shutdown.sh
Apache Tomcat WAR (file format)

Opinions expressed by DZone contributors are their own.

Related

  • Deploy Spring Boot Apps From Jar to War
  • JMeter Plugin HTTP Simple Table Server (STS) In-Depth
  • Optimizing Database Connectivity: A Comparative Analysis of Tomcat JDBC vs. HikariCP
  • Deployment of Spring MVC App on a Local Tomcat Server

Partner Resources

×

Comments
Oops! Something Went Wrong

The likes didn't load as expected. Please refresh the page and try again.

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends:

Likes
There are no likes...yet! 👀
Be the first to like this post!
It looks like you're not logged in.
Sign in to see who liked this post!