Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8243923
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T21:40:35+00:00 2026-06-07T21:40:35+00:00

This is an odd problem. I have a site that is not rendering it’s

  • 0

This is an odd problem. I have a site that is not rendering it’s code correctly. It is a Tomcat 5.0.27-2 server (I know… old) and Apache 2.0.46-77 server. We cannot upgrade them at the moment as that is a bigger change than we are allowed for now.

Anyway, here’s what happens:

Go to https://mysite.com/mysite and the JSP renders correctly
Go to https://www.mysite.com/mysite and the RAW JSP is displayed, no rendering
Go to https://1.2.3.4/mysite and you get the TomCat welcome page.

Had to use a code block as i couldn’t post an invalid IP url.

I’m sure it’s a configuration setting, but I don’t know what it could be. There is an issue that the SSL we have issued was for mysite.com and not http://www.mysite.com, but i don’t think that is what is causing it. I would be happy if I could just redirect all traffic (www.mysite.com and the IP) to mysite.com instead.

I looked at the httpd.conf file. I current have the following in the VirtualHosts:

<VirtualHost 1.2.3.4:80>
 ServerName mysite.com
 DocumentRoot /mysite_root/ROOT
 ServerAdmin me@me.com
<Location "/*.jsp">
  JkUriSet worker ajp13:localhost:8009
</Location>
<Location "/*/*.jsp">
  JkUriSet worker ajp13:localhost:8009
</Location>
<Location "/*/*/*/*/*/*.jsp">
  JkUriSet worker ajp13:localhost:8009
</Location>
  RewriteEngine on
  RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
  RewriteRule .* - [F]
</VirtualHost>

I have updated the files as follows:

httpd.conf

<VirtualHost 1.2.3.4:80>
 ServerName mysite.com
 DocumentRoot /mysite_root/ROOT
 ServerAdmin me@me.com
 JkMount /*.jsp worker1
 JkMount /servlet/* worker1
 RewriteCond %{HTTP_HOST} ^www.mysite.com [nocase]
 RewriteRule ^(.*)         https://www.mysite.com/$1 [last,redirect=301]
</VirtualHost>    

ssl.conf

<VirtualHost 1.2.3.4:443>
 ServerName mysite.com
 DocumentRoot /mysite_root/ROOT
 ServerAdmin me@me.com
 JkMount /*.jsp worker1
 JkMount /servlet/* worker1
 RewriteCond %{HTTP_HOST} ^www.mysite.com [nocase]
 RewriteRule ^(.*)         https://www.mysite.com/$1 [last,redirect=301]
</VirtualHost>    

mod_jk.conf

LoadModule  jk_module   modules/mod_jk.so
<IfModule jk_module>
  JkWorkersFile /etc/httpd/conf/workers.properties
  JkShmFile     /var/log/httpd/mod_jk.shm
  JkLogFile     /var/log/httpd/mod_jk.log
  JkLogLevel    info
  JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
  JkWatchdogInterval 60  
</IfModule>

workers.properties

worker.list=worker1

worker.worker1.type=ajp13
worker.worker1.host=localhost
work.worker1.port=8009

When i restart httpd, there are no errors and it sees the java_home and catalina_home

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T21:40:37+00:00Added an answer on June 7, 2026 at 9:40 pm

    You need to make sure that your JkMount directives are duplicated in all of the <VirtualHost> sections that you have in httpd.conf. If you don’t have a JkMount for one of the cases, then Apache httpd will serve the request instead.

    Your problem also indicates that you are Aliasing a URI to your webapp’s docBase. This is not recommended technique, as it can allow remote clients to request things such as /META-INF/context.xml or /WEB-INF/web.xml and get all kinds of great information about your webapp (database credentials, etc.).

    Also, Tomcat 5.0 is so painfully out of date you really need to get with the program.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have odd problem: After starting server I got this error: undefined local variable
I have this odd problem with a third party script. On our site a
I have this asp.NET web site that for some odd reason doesn't want to
Very odd problem as this is working perfectly on our old Classic ASP site.
I have this odd problem with Spring AOP and I am hoping someone can
hopefully someone can help me with this odd problem. I have a database which
I have an odd problem. When I try to compile the code below, it
I have an odd problem. I have a number of C# apps that utilize
I have got odd problem while sending intent with parcelable object. This object has
I've got this odd problem with jQuery. I'm trying to let the change of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.