What is static Apache setup?

Discussion in 'Server Operation' started by autogun, Jun 17, 2011.

  1. autogun

    autogun New Member

    Hello all,

    I've been asked by a work colleague to setup up a static apache server. I thought it should be an easy task so I d/led latest apache and compiled it with some static modules so it'll server static content only.

    Apparently, I was wrong.
    My colleague said that I compiled it wrong and it has no advantage over regular apache and will die as soon as there would be too many visitors.

    He also asked me the following question:
    And said that if I'll know the answer, I'll be able to setup static Apache correctly.

    Could you guys shed some light on the subject?

    Thanks a bunch!
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    I dont think that there is something like a static apache setup. I guess he meant a setup that is optimized to serve static content (e.g. plain .html pages or images) and not dynamic pages like perl or php pages.

    Apache is a system that can do nearly everything that a webserver can do, so apache is not specialized for a specific purpose. For websites which have high loads and serve a lot of static content, you separate the server part for static and dynamic content.

    For the dynamic content, you use a apache webserver. For the static content, you use a different http server like nginx or lighttpd which is much faster in delivering static files then apache.

    So when your collegue asks you to setup a webserver for static content, I recommend that you use lighhtp or nginx instead of apache.

    You can find tutorials for these two servers here at howtoforge and you should be able to find benchmarks which show the speed improvements over apache.
     
  3. till

    till Super Moderator Staff Member ISPConfig Developer

  4. autogun

    autogun New Member

  5. till

    till Super Moderator Staff Member ISPConfig Developer

    I've answered the question above:

    So the answer to your collegue is: The servers get separated because it is faster to use a special purpose server for static content then running dynamic and static content on the same apache server.
     
  6. autogun

    autogun New Member

    What would be the best ./configure line for compiling Apache for static use?

    For example,

    Compiling with --with-mpm=worker option is a good choice because worker is fast and highly scalable and the memory footprint is comparatively low. It's well suited for multiple processors.

    What other options are must for better performance of a static setup?
     
  7. autogun

    autogun New Member

    This is what I came up with which is quite alright for a static apache configuration:
    Code:
    ./configure --disable-actions --disable-cgi --disable-cgid --disable-include --disable-negotiation --disable-userdir --enable-cache --enable-deflate --enable-disk-cache --enable-expires --enable-logio --enable-mem-cache --enable-proxy --enable-rewrite --enable-so --enable-headers --enable-nonportable-atomics=yes --with-mpm=worker
     

Share This Page