Latest cPanel upcp seems to have broken lsws

Discussion in 'Apache Migration/Compatibility' started by ffeingol, Oct 13, 2007.

  1. ffeingol

    ffeingol New Member

    Hello,

    I can't 100% confirm this yet, but the latest upcp which brought us up to the latest easyapache seems to have broken lsws because it changes how the httpd.conf is written.

    Before it looked like this:

    Code:
    <VirtualHost 205.234.192.199>
    ServerAlias www.xxx.com
    ServerAdmin webmaster@xxx.com
    DocumentRoot /home/xxx/public_html
    ServerName xxx.com
    
    <IfModule mod_suphp.c>
      suPHP_UserGroup xxx xxx
    </IfModule>
    <IfModule mod_php4.c>
      php_admin_value open_basedir "/home/xxx:/usr/lib/php:/usr/local/lib/php:/tmp"
    </IfModule>
    <IfModule mod_php5.c>
      php_admin_value open_basedir "/home/xxx:/usr/lib/php:/usr/local/lib/php:/tmp"
    </IfModule>
    
    User xxx
    Group xxx
    BytesLog /usr/local/apache/domlogs/xxx.com-bytes_log
    CustomLog /usr/local/apache/domlogs/xxx.com combined
    ScriptAlias /cgi-bin/ /home/xxx/public_html/cgi-bin/
    </virtualhost
    
    Now they look like this:

    Code:
    <VirtualHost 205.234.192.199:80>
        ServerAlias www.xxx.com
        ServerAdmin webmaster@xxx.com
        DocumentRoot /home/xxx/public_html
        ServerName xxx.com
        <IfModule mod_suphp.c>
            suPHP_UserGroup xxx xxx
        </IfModule>
        <IfModule concurrent_php.c>
            php4_admin_value open_basedir "/home/xxx:/usr/lib/php:/usr/php4/lib/php:/usr/local/lib/php:/usr/local/php4/lib/php:/tmp"
            php5_admin_value open_basedir "/home/xxx:/usr/lib/php:/usr/local/lib/php:/tmp"
        </IfModule>
        <IfModule !concurrent_php.c>
            <IfModule mod_php4.c>
                php_admin_value open_basedir "/home/xxx:/usr/lib/php:/usr/php4/lib/php:/usr/local/lib/php:/usr/local/php4/lib/php:/tmp"
            </IfModule>
            <IfModule mod_php5.c>
                php_admin_value open_basedir "/home/xxx:/usr/lib/php:/usr/local/lib/php:/tmp"
            </IfModule>
        </IfModule>
        <IfModule !mod_disable_suexec.c>
            User xxx
            Group xxx
        </IfModule>
        BytesLog /usr/local/apache/domlogs/xxx.com-bytes_log
        CustomLog /usr/local/apache/domlogs/xxx.com combined
        ScriptAlias /cgi-bin/ /home/xxx/public_html/cgi-bin/
    </VirtualHost>
    
    The IP:pORT on the virtualHost container really seemed to throw LSWS for a loop. I hand edited the httpd.conf to look like the old style, and then things worked fine.

    Any thoughts on this?

    Thanks,

    Frank
  2. mistwang

    mistwang LiteSpeed Staff

    Which version of LSWS are you using? I think the latest 3.2.3 release should be able to handle it well.
  3. ffeingol

    ffeingol New Member

    Hello,

    We've upgraded to 3.2.3 and that does not seem to help. We had to remove the :80 before LSWS would recognize it. This is an urgent problem unless we can modify the way that cPanel is building the httpd.conf

    Frank
  4. mistwang

    mistwang LiteSpeed Staff

    Since other control panel generate vhost configuration with port number, it should have been support long time ago.

    Please send us a sample httpd.conf, we will take a look.
  5. ffeingol

    ffeingol New Member

    I've sent the httpd.conf to support.

    Frank
  6. mistwang

    mistwang LiteSpeed Staff

    I knew what is wrong, it is because port 79 is used in your Apache httpd.conf. so <VirtualHost IP:80> does not match with any listener, if you change ":80" to ":79", it will work.

    Does cPanel always use port 80 when generate the vhost configuration?
  7. ffeingol

    ffeingol New Member

    Yea, that makes perfect sense.

    before the latest upcp (the new easyapache) it wrote them like:

    <VirtualHost 205.234.192.199>

    now they are

    <VirtualHost 205.234.192.199:80>

    I already have a ticket into cPanel to see if that is (hopefully) part of a template that can be modified. If not, I think we'll have to edit httpd.conf after every add and that will be a major pain for add-on domains and resellers.

    Frank
  8. ffeingol

    ffeingol New Member

    I received a reply from cPanel. The templates (and looks like other useful ones) are located in /usr/local/cpanel/src/templates. Looks pretty simple to either hard code the port to 79 or just remove it all together.

    Frank
  9. mistwang

    mistwang LiteSpeed Staff

    Thanks for the update. this will be helpful to other cPanel users who run Apache behind LiteSpeed.
  10. ffeingol

    ffeingol New Member

    ok,

    Well just as a FYI for other cPanel users this is going to be an issue. Even though you modify the template it still generates the httpd.conf as <virtualHost xx.xx.xx.xx:80>. cPanel has replied that this is working as designed so there is no issue. It's not an issue for cPanel but it's going to be an issue for us LSWS users.

    Frank
  11. mistwang

    mistwang LiteSpeed Staff

    We will add some logic to detect this kind of situation and make it work.
  12. ffeingol

    ffeingol New Member

    Hold on just a bit. cPanel is taking one more look at it.

    Frank
  13. mistwang

    mistwang LiteSpeed Staff

    I also wonder if Apache work properly on port 79 with vhosts configured that way. ;)
  14. ffeingol

    ffeingol New Member

    cPanel has replied back to my ticket. They say in a future release you'll be able to specify an alternate port. But for now you can't modify the template and remove the port or change the port. It's simply ignored.

    Going to have to keep an eye on all domains and add-on's added and manually change httpd.conf.

    Frank
  15. ffeingol

    ffeingol New Member

    Just a FYI (have not had time to test yet). The latest version of cPanel let's you specify the http and https ports under "tweak settings". I now have them set to 79 and 442 so the httpd.conf "should" be built properly.

    Frank
  16. mistwang

    mistwang LiteSpeed Staff

    Thanks for the update. Our 3.3 release should able to handle the httpd.conf with hardcoded port 80/443 as well.
  17. jordan

    jordan New Member

    it should have been support long time ago.

Share This Page