LiteSpeed Extension on Plesk

Discussion in 'General' started by Kirill Dmitriev, Jul 25, 2018.

Tags:
  1. Hi!
    I check the LiteSpeed extension in the Plesk panel, as a result of the tests I had a few questions:
    1) When I switch LiteSpeed as the main server, Apache continues to work, and apparently Lightspeed is needed Apache to work.
    netstat shows that 80 and 443 ports listen by litespeed:
    Code:
    tcp 0 0 109.120.130.244:80 0.0.0.0:* LISTEN 389/litespeed (lsht
    tcp 0 0 109.120.130.244:443 0.0.0.0:* LISTEN 389/litespeed (lsht
    However, at the same time Apache is running, and if I try to disable Apache manually, then litespeed stops working:
    Code:
    lshttpd.service - LiteSpeed HTTP Server
    Loaded: loaded (/usr/lib/systemd/system/lshttpd.service; enabled; vendor preset: disabled)
    Drop-In: /usr/lib/systemd/system/httpd.service.d
    └─limit_nofile.conf
    Active: inactive (dead) since Tue 2018-07-24 16:58:17 MSK; 25s ago
    Process: 32049 ExecStop=/usr/local/lsws/bin/lswsctrl delay-stop (code=exited, status=0/SUCCESS)
    Process: 30896 ExecStart=/usr/local/lsws/bin/lswsctrl start (code=exited, status=0/SUCCESS)
    Main PID: 30917
    Tasks: 0
    Memory: 159.0M
    CGroup: /system.slice/lshttpd.service
    When restarts litespeed, Apache also restarts:
    Code:
    Jul 24 16:55:29 plesk-web systemd[1]: Starting LiteSpeed HTTP Server...
    Jul 24 16:55:29 plesk-web lswsctrl[30896]: [OK] litespeed: pid=30917.
    Jul 24 16:55:31 plesk-web systemd[1]: Started LiteSpeed HTTP Server.
    Jul 24 16:58:16 plesk-web systemd[1]: Stopping LiteSpeed HTTP Server...
    Jul 24 16:58:17 plesk-web systemd[1]: Stopped LiteSpeed HTTP Server.
    
    2018-07-24 16:59:09.761867 [INFO] [LICENSE] License is OK.
    2018-07-24 17:00:06.765714 [NOTICE] SIGUSR2 received, shutdown allowed ...
    2018-07-24 17:00:06.765765 [NOTICE] SIGHUP received, start count down to stop server...
    2018-07-24 17:00:06.784524 [NOTICE] [32472] Server Restart Request via Signal... 
    ...
    Code:
    [Tue Jul 24 17:00:07 2018] [notice] Finish reading Apache configuration, server configured -- resuming normal operations 
    ...
    Code:
    2018-07-24 17:00:07.770458 [ALERT] [Child: 442] LiteSpeed/5.2.8 Enterprise starts successfully!
    I would like to completely abandon Apache, so that sites began to work exclusively through litespeed. Is it possible to do this on the LiteSpeed extension on Plesk Panel?
     
    Last edited by a moderator: Jul 25, 2018
  2. 2) When using multiple sites in one subscription, litespeed for each site uses php.ini only from the first subscription site.
    Created a subscription kdm-lite-test.pa.infobox.ru, added to it the second site kdm2-lite.pa.infobox.ru - both sites used php.ini from kdm-lite-test.pa.infobox.ru. Added the third site, going first in alphabetical order: admin-kde-lite.pa.infobox.ru, after which all three sites began to use php.ini from this site.
    In the LiteSpeed admin panel tried to specify the directives PHPRC and PHP_INI_SCAN_DIR with the values $ VH_NAME or $ VH_ROOT - it had no effect.
    What to do to litespeed searched php.ini in the directory of the site?

    Unfortunately, the mechanism of the forum complained about the content of the post, so I could not attach screenshots and 2 other examples.
     
  3. Unique_Eric

    Unique_Eric Administrator Staff Member

    Hi Kirill,
    1. I only see LiteSpeed read Apache file.
    When starting Litespeed or apache. Can you check process by command `ps aux | grep http` or `ps -ef | grep http`?
    And how did you switch? by plugin or by command?
     
  4. Thanks for the quick response. I'm using a button "Switch to LiteSpeed" in LiteSpeed Extension.
    The result is: "LiteSpeed is running (PID = 30200, Apache_Port_Offset = 0). Apache is not running."

    But I see the processes 30203 httpd (lscgid):
    ps aux | grep http
    root 30200 0.4 0.3 44360 13056 ? S 16:04 0:00 litespeed (lshttpd)
    root 30203 0.0 0.0 8520 656 ? S 16:04 0:00 httpd (lscgid)
    apache 30206 0.1 0.3 62520 12816 ? Sl 16:04 0:00 litespeed (lshttpd)
    apache 30207 0.1 0.3 62520 12816 ? Sl 16:04 0:00 litespeed (lshttpd)
     
  5. Pong

    Pong Well-Known Member Staff Member

    LSWS is a standalone web server and full replacement of apache. In control panel environment, Plesk builds everything on top of Apache, LSWS just read apache configuration and run off it. Any changes, such as adding domains etc, Plesk still writes to apache configuration, but you don't need to worry, Apache won't be running after you switched to LSWS, only LSWS running.
     
  6. Thanks for answers.
    Could you please describe in more detail, what kind of relationship exists between the LSWS and apache?

    It is also interesting to solve the problem, that LSWS use settings from php.ini of the first subscribtion site for all sites of the Plesk subscription.
     
  7. Pong

    Pong Well-Known Member Staff Member

    Let's say that way: you will still make change similar way as before to apache through your Plesk, LSWS will use the same change.. For php.ini, how you make a change to apache, you will do the same, LSWS will use the same change you made?
     
  8. Yes, I use the same settings. I just switch into the Plesk with Apache on the LSWS, and the php.ini stops being correctly identified if there are multiple domains on the subscription.
    Below are screenshots of how the path to php.ini changes if I switch from apache to LSWS:
    Apache: http://i.prntscr.com/ZE3mKStXTkmwXJ8wxIeVzA.png
    LSWS: http://i.prntscr.com/gnZMAi3vQTyTwW6k-1aB5Q.png


    P.S. Is it absolutely impossible to use a LSWS along with working nginx? It would be desirable, that it was possible to choose nginx+Apache or nginx+LSWS.
     
    Last edited by a moderator: Aug 1, 2018
  9. qtwrk

    qtwrk Member

    Hi,

    When using multiple sites in one subscription,

    is that , a sub-domain? or separate domain ? i am trying to reproduce your issue here.



    Is it absolutely impossible to use a LSWS along with working nginx? It would be desirable, that it was possible to choose nginx+Apache or nginx+LSWS.

    I think there is no point to do this, the main reason people uses nginx + apache is want to have nginx's speed for requests and static files , and also Apache's powerful features.

    LSWS possesses both nginx's speed and apache's feature.
     
  10. It's 3 separate domains in one subscription: http://prntscr.com/kdao4f
    I described the method of reproducing the situation in detail in the second message.

    So, I add 4th site which will be the first in alphabetical order aaaa.pa.infobox.ru: http://prntscr.com/kdapom
    And .ini dir changes for all domains in subscription: http://prntscr.com/kdaqk2

    Yes, I understand. But it would be cool if users could choose the bundle of web servers within a single host. But, apparently, it is impossible?
     
    Last edited by a moderator: Aug 1, 2018
  11. Pong

    Pong Well-Known Member Staff Member

    For your php.ini issue, I suggest you create a ticket with us and providing your server tmp root access so that we can check for you.
    For nginx as reverse proxy, I did not see any benefit to use Nginx in front of LSWS. Make sure you enable cache for your application, You will see big difference.
     
  12. As I understand, I can not write a ticket with a trial license? :)
    And you could not reproduce such behavior of LSWS on your Plesk?
     
  13. Pong

    Pong Well-Known Member Staff Member

    for your particular issue php.ini, You should not combine PHPRC with PHP_INI_SCAN_DIR, should only use PHPRC.
    Also seem your subdomains belongs to the same user, so they share the same group of PHP. the php.ini can only be loaded once, whichever is the first loaded. If you really want to use different php.ini, you should create a separate user account, and should not use the same user account.
     

Share This Page