Announcement

Collapse
No announcement yet.

Apache mod_lsapi issues

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    Actualy, to disable mod_lsapi for single domain you may try adding handler for suphp with .htaccess file, like:

    Code:
    <FilesMatch "\.(php4|php5|php3|php2|php|phtml)$">
    
    SetHandler application/x-httpd-php
    
    </FilesMatch>

    Comment


    • #17
      Hi Bogdan. Your documentation specifically states that it is not possible to disable mod_lsapi for an individual domain, once you have enabled mod_lsapi globally:



      > --enable-global - sets up mod_lsapi as a default way to serve PHP, making it enabled for all domains. Once that mode is enabled, you cannot disable mod_lsapi for individual domain

      I would be curious to know if your idea works or not. I have not used --enable-global yet on any of our servers, because I wanted the flexibility to disable for any problematic domains.

      - Scott

      Comment


      • #18
        Bogdan,

        Your recommendation in Post #15 doesnt work for me, FYI. It causes all PHP pages to be downloaded.

        Mike

        Comment


        • #19
          Causes all PHP pages to be downloaded for me as well.

          Comment


          • #20
            just an fyi i had a support ticket about this yesterday and the solution for me was this in case it helps

            Code:
            switch_mod_lsapi --setup; switch_mod_lsapi --enable-global;service httpd restart

            Comment


            • #21
              Suppose suphp config file is not in play, so php pages are downloaded.

              I will have to try it first then will get back to you.

              Comment


              • #22
                Bogdan: Post 15 did not work.

                When an account is added to mod_lsapi it should look like this:
                #mod_lsapi suphp domain handled by lsphp
                AddType application/x-httpd-lsphp .php .php4 .php5 .php53 .php54 .php55 .php56 .php6 .phtml
                AddHandler application/x-httpd-lsphp .php .php4 .php5 .php53 .php54 .php55 .php56 .php6 .phtml

                And Mike and John, you have to uncomment these lines in .htaccess file:
                #mod_lsapi suphp domain handled by lsphp
                #AddType application/x-httpd-lsphp .php .php4 .php5 .php53 .php54 .php55 .php56 .php6 .phtml
                #AddHandler application/x-httpd-lsphp .php .php4 .php5 .php53 .php54 .php55 .php56 .php6 .phtml

                Then the account/domain does not use mod_lsapi. As easy as that?!
                Or you can juse disable cagefs for that account aswell?!

                And Bogdan, I rebuilt php to 5.6.21 on native that cPanel just released. I didn have to run any commands to get accounts/domains on server to use the new version. That happend automatically.

                Comment


                • #23
                  Bogdan: I will do some more testing on other servers aswell and update this thread...
                  But have you gotten many error/issues reported yet and when will there be a new updated release available?

                  Comment


                  • #24
                    Morten, apparently you do not understand the difference between "/usr/bin/switch_mod_lsapi --enable-global" and "/usr/bin/switch_mod_lsapi --enable-domain"

                    I would suggest you read documentation on these two commands, as your advice is meaningless when using --enable-global (which is what Mike, John, Ryan and I are all talking about)

                    - Scott

                    Comment


                    • #25
                      Hmm, I dont think Im missing something here.
                      I have run /usr/bin/switch_mod_lsapi --enable-global on the server and all domains use mod_lsapi.

                      Then on different accounts I uncomment those lines from .htaccess file and when checking phpinfo.php etc they are not using Server API LiteSpeed V6.9 anymore.
                      Please elaborate on what Im missing here?

                      Comment


                      • #26
                        You are NOT using GLOBAL then. With Global, there is no .htaccess changes at all. ALL sites are forced to use mod_lsapi PHP handler.

                        - Scott

                        Comment


                        • #27
                          Using mod_lsapi globally means there are no directives in domains .htaccess file. AddType is defined globally in lsapi.conf file. I agree that most probably you do not run mod_lsapi globally.

                          I did not had a chance to try my solution yet, need more time on this.

                          Comment


                          • #28
                            You are completely correct. I was sure that it was enabled since it was the first server I tested on so not sure what happen :-/
                            I checked lsapi.conf and didnt see anywhere that it was turned on/off.

                            How can I check on a server if its enabled globally or disabled?

                            Comment


                            • #29
                              If it were enabled globally, in /usr/local/apache/conf/conf.d/lsapi.conf you would see:

                              LoadModule lsapi_module modules/mod_lsapi.so

                              <IfModule lsapi_module>

                              AddType application/x-httpd-lsphp .php

                              ... most of the lsapi config

                              </IfModule>

                              If it were not enabled globally, at the very least youd see that AddType line commented out.

                              If it were not enabled globally, everything else aside from the AddType line would remain the same -- Since even if it weren enabled globally, you would need to have the module loaded and config variables set for each of the individually enabled domains to work.

                              Mike

                              Comment


                              • #30
                                As of now I was not able to disable lsphp for single domain if it was enabled globally, but I bet there is a proper way to do it. Will get back here with any news on it.

                                Comment

                                Working...
                                X