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!

php, mod_security, ea4 and litespeed

Discussion in 'EasyApache' started by dzamanakos, Mar 30, 2019.

  1. dzamanakos

    dzamanakos Well-Known Member

    Joined:
    Feb 15, 2014
    Messages:
    46
    Likes Received:
    2
    Trophy Points:
    8
    cPanel Access Level:
    Root Administrator
    Hi, i've two questions, and my setup is centos, cloudlinux, litespeed

    1. I've read on litespeed optimization guide that i can use /dev/shm/phpXX as session.save_path folders for my php versions as a performance tweak. I could add to cagefs these folders through cagefs.mp in order to be accessible from the user.
    I would like to know if, after a restart, cpanel creates /dev/shm/phpXX with the proper permissions if the folder is not found. I also thought that in busy servers, session files in memory could lower the disk overhead, if files (such as session that are not mandatory to exist after a reboot) are written in the ram.
    Has anyone tried this, will that work?

    2. i'm using cpanel's mod_security with the rules "COMODO ModSecurity LiteSpeed Rule Set" added as vendor.
    When i disable/enable a rule, i get a message that i should deploy and restart apache and have to click it in order to apply the changes and get a reply that apache was notified to do a graceful restart. Does that restarts litespeed also, or should i restart afterwards the litespeed service through litespeed plugin?
    Are there any symlinks that restarts litespeed if i click "restart services-> http server (apache)" or i should restart litespeed from that link?

    best regards,
     
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager Staff Member

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

    I'm happy to perform these actions on a test server to verify what happens. Can you share the step-by-step instructions for the specific actions you'd like us to test so I can replicate them on a test server?

    Using WHM >> Restart Services >> HTTP Server (Apache) or /scripts/restartsrv_httpd (via the command line) will automatically perform the necessary LiteSpeed service restart.

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. dzamanakos

    dzamanakos Well-Known Member

    Joined:
    Feb 15, 2014
    Messages:
    46
    Likes Received:
    2
    Trophy Points:
    8
    cPanel Access Level:
    Root Administrator
    Hi, thank you for your reply.

    My scenario is :

    I want to store php session files to /dev/shm in order to have less overhead in my disks.

    I can browse to WHM->multiphp ini editor -> phpXX and set session.save_path to /dev/shm/php/phpXX for all my php versions.
    After save, will cpanel create these directories or should i create them myself?

    When i restart my server /dev/shm will be erased, after boot will cpanel create these dirs before web server starts, or i'm going to get error messages because the folders will not exist?

    best regards,
     
  4. cPanelMichael

    cPanelMichael Technical Support Community Manager Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    47,005
    Likes Received:
    2,123
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    You will need to create those directories before updating the session.save_path value in WHM >> MultiPHP INI Editor >> Basic Mode. The individual directories (e.g. /dev/shm/php/php72) should be owned by root and set to 1733 permissions.

    cPanel & WHM will not automatically create those directories at boot time. You'll need to manually create them any time you boot the system or setup a script to automatically create them when the system boots. You may also want to consider posting directly to the LiteSpeed Forums to see if any other LiteSpeed administrators have implemented a similar setup.

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. dzamanakos

    dzamanakos Well-Known Member

    Joined:
    Feb 15, 2014
    Messages:
    46
    Likes Received:
    2
    Trophy Points:
    8
    cPanel Access Level:
    Root Administrator
    Hi, thank you for your reply.
    I'll check with other forums too.
     
    cPanelMichael likes this.
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