Skip to main content

php, mod_security, ea4 and litespeed

Comments

4 comments

  • cPanelMichael
    Hello @dzamanakos,
    . 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?

    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?
    . 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?

    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.
    0
  • dzamanakos
    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,
    0
  • cPanelMichael
    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?

    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.
    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?

    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
    0
  • dzamanakos
    Hi, thank you for your reply. I'll check with other forums too.
    0

Please sign in to leave a comment.