PDA

View Full Version : Latest cPanel upcp seems to have broken lsws


ffeingol
10-12-2007, 10:28 PM
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:


<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:


<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

mistwang
10-13-2007, 07:51 PM
Which version of LSWS are you using? I think the latest 3.2.3 release should be able to handle it well.

ffeingol
10-14-2007, 04:57 PM
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

mistwang
10-14-2007, 05:32 PM
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.

ffeingol
10-14-2007, 06:04 PM
I've sent the httpd.conf to support.

Frank

mistwang
10-14-2007, 07:37 PM
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?

ffeingol
10-14-2007, 07:47 PM
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

ffeingol
10-15-2007, 07:27 AM
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

mistwang
10-15-2007, 10:51 AM
Thanks for the update. this will be helpful to other cPanel users who run Apache behind LiteSpeed.

ffeingol
10-19-2007, 01:48 PM
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

mistwang
10-19-2007, 02:15 PM
We will add some logic to detect this kind of situation and make it work.

ffeingol
10-19-2007, 02:25 PM
Hold on just a bit. cPanel is taking one more look at it.

Frank

mistwang
10-19-2007, 02:32 PM
I also wonder if Apache work properly on port 79 with vhosts configured that way. ;)

ffeingol
10-20-2007, 07:19 AM
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

ffeingol
11-01-2007, 07:27 AM
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

mistwang
11-01-2007, 01:10 PM
Thanks for the update. Our 3.3 release should able to handle the httpd.conf with hardcoded port 80/443 as well.

jordan
11-06-2007, 10:33 PM
it should have been support long time ago.