Skip to main content

Tomcat with AutoSSL using EasyApache 3 with mod_jk

Comments

5 comments

  • cPanelMichael
    Hello @Raj Janorkar, Can you let us know the contents of the .htaccess file in the directory where the Java application is stored? Thank you.
    0
  • Raj Janorkar
    Options -MultiViews Options -Indexes RewriteEngine On # Apache Shindig RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$ RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$ RewriteRule ^(shindig) - [L] # Redirect without www to www RewriteCond %{HTTP_HOST} ^example\.com$ [NC] RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$ RewriteCond %{HTTP_HOST} ^example\.com$ [NC] RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$ RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$ RewriteRule ^(.*)$ iGoogle Portal [L,R=301] # Redirect all trafic from https to http # RewriteCond %{HTTPS} on #RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$ #RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$ # RewriteRule ^ http://%{HTTP_HOST}%{REQUEST_URI} [L] # Redirect Trailing Slashes If Not A Folder... RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$ RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$ RewriteRule ^(.*)/$ /$1 [L,R=301] # Handle Front Controller... RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$ RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$ RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$ RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$ RewriteRule ^ index.php [L] # Handle Authorization Header RewriteCond %{HTTP:Authorization} . RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$ RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$ RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
    Michael, Without SSL normal http you can see my tomcat app is returning js [PHP]http://www.example.com/shindig/gadgets/js/core:open-views:opensearch:container:rpc:selection:views:actions:opensocial:xmlutil.js?c=1&debug=0&container=default[/PHP] but with SSL : HTTPS it is not working [PHPhttps://www.example.com/shindig/gadgets/js/core:open-views:opensearch:container:rpc:selection:views:actions:opensocial:xmlutil.js?c=1&debug=0&container=default[/PHP] so in my app if url content "/shindig/" then it should serve tomcat app content. cp_jkmount.conf in ssl & std setup is same as it is working on std. not sure whats going on.. Thank you for your help
    0
  • Raj Janorkar
    It started working when i copy - cp_jkmount.conf file from std to ssl below.
    • /usr/local/apache/conf/userdata/std/2/$user/$domain/
    • /usr/local/apache/conf/userdata/ssl/2/$user/$domain/
    now i have mixed contents issues apache is blocking all css/js served over http. Does anybody have idea how to allow to serve both https/http content.
    0
  • cPanelMichael
    Hello @Raj Janorkar, I believe the issue you notice relates to an older internal case (EAL-43) that notes SSL reliability issues with mod_jk when using Tomcat with EasyApache 3. There's no planned solution on that case due to EasyApache 3's impending end-of-life. In the meantime, the following third-party URL offers a potential workaround for the mixed-content warnings: The Experimental Repository - EasyApache 4 - cPanel Documentation Thank you.
    0

Please sign in to leave a comment.