Aapache 2, Php CGI-MODE, LightTPD, MAILSCANNER!

tom_taylor

Active Member
Nov 30, 2005
37
0
156
Warrington, UK
Hiya

Will WHM be supporting Apache 2 anytime soon?

Also, would php be run in cgi-mode in the future? Just to speed things up a bit?

It would be great if everything could be proxied through to LightTPD (www.lighttpd.net), which is really fast and much better than Apache

Only problem is that "Lighty" does not support .htaccess files, and the config is totally different compared with apache's

If we can make these both work together, apache using .htaccess etc and its virtual hosts and just let lighty serve the requests, we could speed things up!

Also, MAILSCANNER (www.mailscanner.info) along with ClamAV should be installed and included as standard. They're open source and no one should have to pay for the pleasure of having others install it.

I think with the inclusion of MailScanner, and with Lighty or another light-feather-weight httpd, would help to battle spam and could even make a difference if spammers can't get through to thousands!

Thanks
 
Last edited:

tom_taylor

Active Member
Nov 30, 2005
37
0
156
Warrington, UK
Or we could use LightTPD or Nginx as a backend proxy which would serve our files.

Just need a way in which cpanel can setup the config automatic when creating accounts, subdomains etc OR when you send the requests via apache's proxy mod through to one of the feather weight servers, it will send the document root. That way only apache's config would ever be updated!

Proxying them together is easy, its just making this solution work perfect!
 

tom_taylor

Active Member
Nov 30, 2005
37
0
156
Warrington, UK
NOTE: sorry about duplicate postage, i got a bit excited :D

Nginx 0.5 is even faster (with its php-fastcgi) AND supports .htaccess files :)

check out the NginxNews too!

I think with regards to the htaccess files, the syntax may differ compared with apache - but at least we have its support (unlike lighty!)

I reckon Nginx is mature enough to lighten up WHM and cPanel ;)

  • Apache 2.2.3 = 4439 req/s
  • Lighttpd 1.4.11 = 7150 req/s
  • Nginx 0.4.12 = 8700 req/s

http://blog.kovyrin.net/2006/04/17/typical-nginx-configurations/
http://blog.kovyrin.net/2006/04/04/nginx-small-powerful-web-server/
http://blog.zabiello.com/articles/2006/11/08/nginx-apache-killer
http://zh.stikipad.com/notes/show/nginx
http://blog.kovyrin.net/2006/05/30/nginx-php-fastcgi-howto/


It also supports nearly all mods which LightTPD does, and probably does it better!

Lets get this into WHM!


my idea: http://forums.cpanel.net/showthread.php?p=286555&posted=1#post286555


Cheers everyone!
 

nickp666

Well-Known Member
Jan 28, 2005
769
2
168
/dev/null
If you run EDGE Apache2 is available, php can already be run as a CGI on all builds and as for mailscanner, configserver 'chirpy's company' already provide a free mailscanner install script, cpanel have been working on their own cpsrvd for WHM and cPanel which seems to run very nicely on reasonable spec servers
 
Last edited:

tom_taylor

Active Member
Nov 30, 2005
37
0
156
Warrington, UK
LOL sorry nick but no1 wants to run EDGE if its a production environment and is hosting many important sites, NOR do they want to run apache 2 as its just as bad as apache 1.x

The cgi-modes for apache are pretty grim, lightTPD and Nginx have cgi-mode already included and ready to go unlike apache, plus they are much faster as many benchmarks show!

You must understand that apache is too slow and too much of an overhead, about time everyone else here at cpanel realised the same vision most of us have with newer and lighter httpds!

Yup a reckon chirpy's scripts should be included into all cpanel builds and release's

Anyways, Nginx is the way to go, not Apache2

Apache2 can still be used, BUT as long as Nginx takes the load then thats fine.
 
Last edited:

nickp666

Well-Known Member
Jan 28, 2005
769
2
168
/dev/null
LOL sorry nick but no1 wants to run EDGE if its a production environment and is hosting many important sites, NOR do they want to run apache 2 as its just as bad as apache 1.x

The cgi-modes for apache are pretty grim, lightTPD and Nginx have cgi-mode already included and ready to go unlike apache, plus they are much faster as many benchmarks show!

You must understand that apache is too slow and too much of an overhead, about time everyone else here at cpanel realised the same vision most of us have with newer and lighter httpds!

Yup a reckon chirpy's scripts should be included into all cpanel builds and release's

Anyways, Nginx is the way to go, not Apache2

Apache2 can still be used, BUT as long as Nginx takes the load then thats fine.
Granted EDGE isnt for the faint hearted, but its re-assuring to know that its being properly tested before being commited to the CURRENT and STABLE builds, I have some servers running EDGE and some running CURRENT, its rare that an error occurs in EDGE that cant be fixed with a bit of effort (obviously aside from code bugs)

Would you care to elaborate on apache's cgi-modes, I dont personally have much knowledge on this area, but am interested to know the pit-falls in comparison with the other httpd's

For all its faults, I cant say ive ever used a http daemon that is as customisable and reliable as Apache especially in high-load environments, obviously this is open to opinion and interpretation and I guess this really depends on what spec your servers are and what they are processing (Just my opinions)

As much as I agree with you with regard to chirpy's scripts being included in cPanel builds, I really cant see them doing it as a core part of the system, its more work for them to troubleshoot mail issues, more software changes for them to keep an eye on etc, I think they need to structure the 'Addon Modules' functionality in WHM similar to the way cpAddons works enabling others to set up module repos for inclusion, this would counter out the work cPanel need to do to keep mailscanner up to date and introduce much better functionality for third party developers to incorporate their own modules into cPanel and keep them up to date
 

brianoz

Well-Known Member
Mar 13, 2004
1,146
7
168
Melbourne, Australia
cPanel Access Level
Root Administrator
PHP cgi mode is slower than having PHP run in an Apache module, cpanel already support PHP in cgi mode and have for years. There are a lot of issues here Tom, cpanel can't just jump in like a bunch of cowboys roaring around the corral yelling yippee and switch over half of their subsystems to things you've found with 10 minutes of googling.

When you support software that runs many, many thousands of webhosts you have to do some serious thinking and testing before changing anything - even the slightest change can impact people as you'd be aware if you spent a little more time reading and a little less time posting.

As, for instance with Apache 2.0, which cpanel are already testing in EDGE. Are you seriously suggesting that they skip testing it in EDGE and suddenly release it? It would probably break the world, and we'd justifiably beat them up severely for their lack of discipline.

You'd know all of this if you'd done some college training, or been around for a while. Slow down a little and learn more before posting; enthusiasm is great, but needs to be tempered by experience. I'm sure you have something to contribute, but right now you're just adding to the noise around here.
 

tAzMaNiAc

Well-Known Member
Feb 16, 2003
558
0
166
Sachse, TX
Also..

Also.. Mailscanner is a resource hog.. BIG time.. especially when you have busy servers so I wouldn't want it as default.
 

tom_taylor

Active Member
Nov 30, 2005
37
0
156
Warrington, UK
PHP cgi mode is slower than having PHP run in an Apache module, cpanel already support PHP in cgi mode and have for years. There are a lot of issues here Tom, cpanel can't just jump in like a bunch of cowboys roaring around the corral yelling yippee and switch over half of their subsystems to things you've found with 10 minutes of googling.

When you support software that runs many, many thousands of webhosts you have to do some serious thinking and testing before changing anything - even the slightest change can impact people as you'd be aware if you spent a little more time reading and a little less time posting.

As, for instance with Apache 2.0, which cpanel are already testing in EDGE. Are you seriously suggesting that they skip testing it in EDGE and suddenly release it? It would probably break the world, and we'd justifiably beat them up severely for their lack of discipline.

You'd know all of this if you'd done some college training, or been around for a while. Slow down a little and learn more before posting; enthusiasm is great, but needs to be tempered by experience. I'm sure you have something to contribute, but right now you're just adding to the noise around here.
Now now, i didnt ask to be judged in this post lol

Of course i understand all of the problems that could arrise, and i'm sure this would be a big change.

It would nice as an option, similar to apache2 anyhow.

And php in cgi-mode is not slow with Nginx or lighty, but it is with apache.

Anyhow i'll be making the transition to Nginx or Lighty, and ill let you know how i get on.

If anyone else wish's to do the same then that would be great.

Sorry to go off topic, but mailscanner doesn't hog resources if its configured correctly :P Plus if you use a light httpd which only uses upto 15meg of ram at the most, then they're shouldn't be a problem.

Nginx seems to be better than lighty (due to its .htaccess support and is alot faster) so i will proxy this with apache.

Ideally i'll still want to set config within apache for vhosts, but let Nginx parse php in cgi-mode and then pass back the result to apache for delivery to the end client.

Really though this is a challenge within itself, so wish me luck ;)

Tom
 

Spiral

BANNED
Jun 24, 2005
2,018
8
193
Just a side note if you are really considering Apache 2 ...

I have extensive experience with both upgrading and deploying Cpanel servers
using both Apache 2.0.59 and SuPHP (much better than phpsuexec) so if you
are thinking about jumping the gun and going that route now, contact me.

I have already helped a large number of hosts convert all their production servers
already and the jump to EDGE is really not much of a concern for any of them
because Cpanel has not released a bug yet that I couldn't fix in a matter of
seconds and I am already well aware of what issues there are already and
automatically compensate for those items in advance of Cpanel anyway.
 

sldubr

Member
Aug 31, 2007
10
0
51
Nginx seems to be better than lighty (due to its .htaccess support and is alot faster) so i will proxy this with apache.
Ideally i'll still want to set config within apache for vhosts, but let Nginx parse php in cgi-mode and then pass back the result to apache for delivery to the end client.
Tom
No, you are not right. Use nginx as revers proxy: web client -> nginx -> apache.
We do it and it is do great result. It's easy. :)

WBR,
Slava