Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

How to resolve .htaccess 'SetEnv' for tomcat

Discussion in 'EasyApache' started by Aoifem, Feb 18, 2019.

Tags:
  1. Aoifem

    Aoifem Registered

    Joined:
    Feb 18, 2019
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Ireland
    cPanel Access Level:
    Root Administrator
    Hi all,

    I am trying to host my java website and having a bit of trouble. I followed this tutorial: How to Deploy Java Applications - cPanel Knowledge Base - cPanel Documentation

    But I am receiving and Internal Server Error when trying to access the domain from the web.
    The message in the Error logs say:
    /home/myusername/public_html/.htaccess: Invalid command 'SetEnv', perhaps misspelled or defined by a module not included in the server configuration

    In my .htaccess file is:
    SetHandler jakarta-servlet
    SetEnv JK_WORKER_NAME ajp13

    Could someone shed some light on the code that would fix this error?
     
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    47,009
    Likes Received:
    2,123
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello @Aoifem,

    The document you referenced is intended for systems using EasyApache 3. EasyApache 3 is near end-of-life status, and thus it's generally advised to convert your system to EasyApache 4 and install Tomcat with the instructions documented below:

    Tomcat - EasyApache 4 - cPanel Documentation

    Let me know if you have any questions.

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice