Case in point:
1.How to set up .JSP pages to run from domain's DocumentRoot directory
Resolution to meet the following requirements.
a. Can upload single files to tomcat
b. Access www.domain.tld instead of http"domain.tld:8080
Steps:
1. Install compoment "Tomcat Java Servlets support" ("Plesk hosting features" group) through GUI
Tools & Settings > Updates and Upgrades. The component will install Tomcat and all required packages for Java support in Parallels Plesk Panel.
2.Enable the Tomcat service
Click Tools & Settings. From the Server Management section, click Services Management.
To the right of Server Management, click Play near Tomcat Java.
3. To Verify Tomcat is running:
---
~# netstat -plant|grep 9080
-tcp 0 0 :::9080 :::* LISTEN 20018/java
--
4.Unpack all application files in the httpdocs folder of the domain( /var/www/vhosts/tld.com/httpdocs ).
Configure all necessary permissions for the tomcat user (so that the user can modify the files, for example).
5.) Add the tomcat system account to the psaserv group to allow the user to go through the httpdocs folder:
----
# usermod -a -G psaserv tomcat
----
6.) Modify the /var/www/vhosts/domain.tld/conf/vhost.conf file for forwarding all requests with the
http://domain.tld/ URL to Tomcat:
To Modify Via Plesk:
-Under Websites&Domains > Apache & Nginx Settings, place under Additional HTTP/HTTPS directive the ff.:
----
<IfModule mod_jk.c>
JkMount /*.jsp ajp13
DirectoryIndex index.jsp index.php index.shtml index.html index.htm
</IfModule>
---
7. Create a context for the application in the /etc/tomcat/PSA/tld.com/ROOT.xml
------
<Context crossContext="false"
reloadable="false" useNaming="true" debug="0" swallowOutput="false"
privileged="true" displayName="My application"
docBase="/var/www/vhosts/tld.com/httpdocs" cookies="true"
path="" cachingAllowed="true"/>
------
The docBase parameter should be equal to the httpdocs path. The path parameter value should be empty.
8.) Reconfigure the website and restart Tomcat service:
----
# /usr/local/psa/admin/bin/httpdmng --reconfigure-domain <yourdomain.com>
#systemctl restart tomcat.service
NOTE: The above steps were patterned from the 3rd method of the Plesk KB: http://kb.odin.com/en/8569
- 0 Users Found This Useful
Related Articles
Setup DNS in Plesk
Please note that we do not offer DNS hosting. To get your site hosted on the VPS, you can either:...
How to create a catch-all email account
From Plesk control panel, select your domain name. Then click on "Mail Accounts" > "Mail...
Enabling Submission Port from Plesk control panel
If SMPT port 25 is not working from your end, kindly enable Submission Port from Plesk.It's very...
Creating FTP account
FTP account is created upon adding a domain in Plesk.If you have not yet added your domain in...
Creating an email account
To create an email account, login first to Plesk control panel.1. Click on Domains.2. Select your...