Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Best LEB Apache setting
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Best LEB Apache setting

Hello..

Are there any good or recommended setting for apache on LEB Vps? Lets say on 512MB Ram..

What is the setting for example for the maxserver, startserver, etc..

Thanks..

Comments

  • awsonawson Member

    Only enable modules you need

  • alexalex Member
    edited July 2013

    best LEB Apache setting is --no-apache --with-nginx

    Thanked by 1Roph
  • AdducAdduc Member

    Given this community is low-end oriented, I'd be remiss not to tell you to switch to Nginx or Lighttpd if you could. They're typically more memory efficient AND perform better than Apache in most situations.

    If you can't switch, due to some complex .htaccess files or a need for a specific Apache module, the default Apache configuration is not horrible. The MaxServer should only be a concern if you expect high traffic; if not, I wouldn't worry about it. The default is a sane setting. We run plenty of servers with Apache due to some legacy PHP code (dependant on passed in apache env variables), and we typically leave Apache's configuration file default. We do disable .htaccess files, mainly for security purposes, tossing our rewrite directives and other settings into the virtual host configuration.

  • Wira_SoenaryoWira_Soenaryo Member
    edited July 2013

    Hello,

    I know should use nginx instead of apache.. But sometimes need to know whether we can still using apache on LEB.

    Here is the current setting on my server..

    IfModule prefork.c :
    StartServers 2
    MinSpareServers 10
    MaxSpareServers 25
    ServerLimit 100
    MaxClients 50
    MaxRequestsPerChild 20

    IfModule worker.c :
    StartServers 2
    MinSpareThreads 10
    MaxSpareThreads 25
    ThreadsPerChild 50
    MaxClients 50
    MaxRequestsPerChild 20

    =========================

    Any suggestion much appreciate.. sorry for my dummy question..

    Thanks..

  • smansman Member
    edited July 2013

    Taken directly from the legacy OpenVZ swtune.conf file which was installed by default on CentOS 5 templates. Now they just edit the httpd.conf file directly. I swear by these settings on all my VPSs and all my websites. If you have more traffic than these settings can handle you shouldn't be running on 512MB anyways.

    ##

    ## Server-Pool Size Regulation (MPM specific)

    ##

    # prefork MPM

    # StartServers: number of server processes to start

    # MinSpareServers: minimum number of server processes which are kept spare

    # MaxSpareServers: maximum number of server processes which are kept spare
    # ServerLimit: maximum value for MaxClients for the lifetime of the server

    # MaxClients: maximum number of server processes allowed to start

    # MaxRequestsPerChild: maximum number of requests a server process serves
    <IfModule prefork.c>

    StartServers 1

    MinSpareServers 1

    MaxSpareServers 3

    ServerLimit 10

    MaxClients 10

    MaxRequestsPerChild 4000

    </IfModule>

    # worker MPM

    # StartServers: initial number of server processes to start

    # MaxClients: maximum number of simultaneous client connections

    # MinSpareThreads: minimum number of worker threads which are kept spare

    # MaxSpareThreads: maximum number of worker threads which are kept spare

    # ThreadsPerChild: constant number of worker threads in each server process

    # MaxRequestsPerChild: maximum number of requests a server process serves

    <IfModule worker.c>

    StartServers 1

    MaxClients 10

    MinSpareThreads 1

    MaxSpareThreads 4

    ThreadsPerChild 25

    MaxRequestsPerChild 0

    </IfModule>

Sign In or Register to comment.