Couple of Apache questions

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • djn
    Senior Member
    • Mar 2004
    • 140

    #1

    Couple of Apache questions

    1) I've just looked into a freshly created account with a browser and the folder listing says "Proudly Served by LiteSpeed Web Server". I guess this is just Apache masquerading as another server?

    2) I clicked for the first time on the 'Optimize Website' icon in cPanel and found the mod_deflate switch. What is the correct setting to switch it on and still be able to fine-tune it inside .htaccess?

    3) Apache 2.2 comes with httxt2dbm, a script to convert text-based RewriteMaps into their dbm equivalent. Can we make use of it (as in - do we have the necessary permissions) and what's the path to it? If not, has anybody tried to use a dbm Rewritemap created on Windows on a Linux server?
  • AndrewT
    Administrator
    • Mar 2004
    • 3655

    #2
    1. No. LiteSpeed is entirely different; see litespeedtech.com. We're slowly migrating all servers from Apache to LiteSpeed. While it is by no means free for us to do this (licensing costs vs Apache being free), the performance is far superior and well worth it.

    2. LiteSpeed automatically handles the compression. No need to worry about this as there isn't anything for you to configure.

    3. This is not something that we provide. I'm not able to answer the second part of your question as I've not tried it.

    Comment

    • djn
      Senior Member
      • Mar 2004
      • 140

      #3
      Huh. Interesting|! I've found some info here: http://www.litespeedtech.com/docs/we...eral/#htaccess , but it seems a little outdated, as is doesn't list some directives that I have working right now up on cpanel59 (which I get is already on litespeed) like SetHandler and ErrorDocument.

      Browsing their forums I saw that it is possible to have PHP configuration stuff both in .htaccess (as php_flag|php_value) and in per-directory php.ini. Is this true for Dathorn's configuration too? There were also mentions of mod_headers...

      As for the dbm, I guess I'll just have to try myself.

      Comment

      • ZYV
        Senior Member
        • Sep 2005
        • 315

        #4
        Andrew, are you going to do a write-up on the results of this migration? I checked it out, and LiteSpeed is ~$700 per year for a 4-core machine which is quite expensive when compared to $0.

        I also checked out updated benchmarks, but for some weird reason they mainly use lighttpd as a reference, which as far as I know is at it's last gasp and no single mention of nginx, which is being actively developed, quickly taking over the net and in many benchmarks has shown ~30% performance increase comparing to lighttpd.

        Of course, on one hand, the main selling point of LiteSpeed is that it's literally a drop-in replacement for Apache, e.g. it understands its configuration format and therefore can easily integrate with cPanel and friends...

        On the other hand, you can use nginx as a front-end and Apache as a backend in a completely transparent way. I was still able to get a huge performance increase when serving lots of small files or large requests to slow clients. And all this for $0 + nginx source code is available for inspection under a very liberal licence, unlike LiteSpeed's binaries which no one knows how they build.

        Comment

        • AndrewT
          Administrator
          • Mar 2004
          • 3655

          #5
          djn: You can now include PHP settings in .htaccess files per directory just like mod_php. php.ini support is limited to the public_html/php.ini and will apply to the entire account.

          ZYV: As you've noted, the draw to LiteSpeed is the fact that it is a drop-in replacement for Apache. This is absolutely necessary when dealing with a shared hosting environment of active websites that already depend on Apache.

          In most shared hosting cases you won't need more than a 1 or 2 core license assuming you have good hardware. This just limits the LSWS processes to these cores; PHP processes, etc. still run on all cores.

          We performed extensive testing of LiteSpeed before even considering it for use on a live environment. All of the testing was done with only a 1 core license. Not only does LiteSpeed serve static files much more efficiently than Apache but the PHP LSAPI with suexec blows Apache mod_suphp out of the water. All things considered, it really isn't much of a comparison at all. The choice is obvious.

          Some recent benchmarks are available here: http://blog.litespeedtech.com/2010/0...ache-vs-nginx/

          These came from WHT where several individuals configured their respective web server choices on the same server and ran AB on it. You can see where Apache mod_suphp falls and those numbers were similar to what we were able to obtain.

          Comment

          • ZYV
            Senior Member
            • Sep 2005
            • 315

            #6
            Hi Andrew!

            Thank you very much for the details. You are right, I didn't fully appreciate the fact that given you're using a reasonably fast httpd, the rest of the cores will not idle either way because of the CGI & database processes. Having this said, the price they ask does not actually look that scary.

            However, I think that their comparisons to nginx are nonsensical. Its modular and scalable design implies very serious I/O penalties if you are not using asynchronous IO (which they didn't use, because the requires patches are unavailable for CentOS 5.4 kernel) and only one worker, so the results are very well predictable.

            A fair comparison would be to use a single CPU and compare Litespeed to nginx with AIO or a reasonable amount of workers. I'm really interested in seeing what will happen, but unfortunately kind of short of time ATM.

            What's really interesting is how much you will be able to get better when comparing nginx as a reverse proxy + Apache with Litespeed, because you don't really have an option to give up on Apache or Apache-compatible server.

            Speaking of which I noticed, that the cpanel I'm on got converted to Litespeed... and it screwed my website which used the following Apache directives:

            HeaderName /_header.html
            ReadmeName /_footer.html

            IndexOptions Charset=UTF-8 FoldersFirst VersionSort XHTML FancyIndexing NameWidth=*
            IndexIgnore cgi-bin robots.txt favicon.ico .ftpquota .listing _header.html _footer.html _header.adsense.html mc

            # Custom FileType Icons by Arne Fahrenwalde

            # Pictures
            AddIcon http://<domain>.net/icons/image.png .jpg .jp2 .jif .jpeg .tiff .tif .pict .pct .bmp .gif .png .psd .tga .ai .indd .fh* .fh10 .xcf .svg
            It seems that Litespeed's support for Apache directives leaves much to be desired. Is there anything that can be done to fix this issue? Should I submit a TT?

            Thanks!

            Comment

            • AndrewT
              Administrator
              • Mar 2004
              • 3655

              #7
              No benchmark is perfect. No matter what someone will always think that something should have been done differently. My point in providing the link was merely to show the huge difference between LiteSpeed and Apache, particularly with suphp. I did not say that LiteSpeed was the best. It is simply the best for our needs.

              Please submit a ticket concerning your problem and I can see what we can do. It would help if you could let us know exactly which directive you're having problems with.

              Comment

              Working...