<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://freebsdwiki.net/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://freebsdwiki.net/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Baraboom</id>
		<title>FreeBSDwiki - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="http://freebsdwiki.net/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Baraboom"/>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/Special:Contributions/Baraboom"/>
		<updated>2026-04-08T06:56:09Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.18.0</generator>

	<entry>
		<id>http://freebsdwiki.net/index.php/Apache,_Configuring</id>
		<title>Apache, Configuring</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/Apache,_Configuring"/>
				<updated>2005-10-20T13:13:55Z</updated>
		
		<summary type="html">&lt;p&gt;Baraboom: /* Prefork */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;If you've got a busy webserver, you'll soon find yourself looking at tweaking the Apache configuration to get more. As it is, most Apache installs are configured for testing / development vs production use.&lt;br /&gt;
&lt;br /&gt;
==MPM==&lt;br /&gt;
&lt;br /&gt;
By default, the httpd.conf has MPM specific settings for all possible MPM choices. However, since this choice is made at compile-time, all but one of these MPM specific can be safely removed. The default (and usually the recommended) MPM is prefork.&lt;br /&gt;
&lt;br /&gt;
 ##&lt;br /&gt;
 ## Server-Pool Size Regulation (MPM specific)&lt;br /&gt;
 ##&lt;br /&gt;
&lt;br /&gt;
===Prefork===&lt;br /&gt;
&lt;br /&gt;
This is the default MPM and will work fine for most applications.&lt;br /&gt;
&lt;br /&gt;
Default:&lt;br /&gt;
 # prefork MPM&lt;br /&gt;
 # StartServers: number of server processes to start&lt;br /&gt;
 # MinSpareServers: minimum number of server processes which are kept spare&lt;br /&gt;
 # MaxSpareServers: maximum number of server processes which are kept spare&lt;br /&gt;
 # MaxClients: maximum number of server processes allowed to start&lt;br /&gt;
 # MaxRequestsPerChild: maximum number of requests a server process serves&lt;br /&gt;
 &amp;lt;IfModule prefork.c&amp;gt;&lt;br /&gt;
 StartServers         5&lt;br /&gt;
 MinSpareServers      5&lt;br /&gt;
 MaxSpareServers     10&lt;br /&gt;
 MaxClients         150&lt;br /&gt;
 MaxRequestsPerChild  0&lt;br /&gt;
 &amp;lt;/IfModule&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Tweaked:&lt;br /&gt;
 StartServers        10&lt;br /&gt;
 MinSpareServers     10&lt;br /&gt;
 MaxSpareServers     20&lt;br /&gt;
 MaxClients         256&lt;br /&gt;
 MaxRequestsPerChild 15000&lt;br /&gt;
&lt;br /&gt;
'''StartServers, MinSpareServers, MaxSpareServers'''   &lt;br /&gt;
Creating a child process can be one of the most expensive in terms of CPU usage. Experiment with raising these values... as a start, you can probably safely double them and go from there. During traffic spikes, the server will have more available, idle child processes already created, which should help reduce load and keep the server busier serving content than spawning new servers when needed.&lt;br /&gt;
&lt;br /&gt;
'''MaxClients'''   &lt;br /&gt;
With a busy website you may start reaching the default MaxClients, in which case everyone else is locked out. This error will show up in your error logs. Please note that there is a hard limit of 256 for this directive. Raising it requires setting a compile-time option and reinstalling. Still, 256 is much heftier than 150, so this may work out fine.&lt;br /&gt;
&lt;br /&gt;
'''MaxRequestsPerChild'''   &lt;br /&gt;
Leaving this at 0 means a child never dies... once its created it will serve an unlimited number of requests until the main daemon kills it off during traffic lulls. Setting this to a high number has the benefit of periodically refreshing the pool of child processes and keeping memory leakage to a minimum.&lt;br /&gt;
&lt;br /&gt;
===Worker===&lt;br /&gt;
&lt;br /&gt;
In order to try out the worker MPM, you must re-install Apache2 with different MAKE_ARGS. For the brave, please see this page: [[Apache2 with the Worker MPM]].&lt;br /&gt;
&lt;br /&gt;
==KeepAlives==&lt;br /&gt;
&lt;br /&gt;
The KeepAlives directive is enabled by default; to quote from the Apache documentation:&lt;br /&gt;
 The Keep-Alive extension to HTTP/1.0 and the persistent connection feature of &lt;br /&gt;
 HTTP/1.1 provide long-lived HTTP sessions which allow multiple requests to be &lt;br /&gt;
 sent over the same TCP connection. In some cases this has been shown to result&lt;br /&gt;
 in an almost 50% speedup in latency times for HTML documents with many images. &lt;br /&gt;
&lt;br /&gt;
Which is a good thing, if you want fast pages and have a strong server to handle it. If you're more concerned with availability than speed, or are running Apache on a less-than-stellar machine, you may get better performance (cpu/processor-wise, at least,) by turning KeepAlives off:&lt;br /&gt;
&lt;br /&gt;
Default:&lt;br /&gt;
 KeepAlives On&lt;br /&gt;
&lt;br /&gt;
Tweaked:&lt;br /&gt;
 KeepAlives Off&lt;/div&gt;</summary>
		<author><name>Baraboom</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/Apache,_Configuring</id>
		<title>Apache, Configuring</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/Apache,_Configuring"/>
				<updated>2005-10-20T13:11:19Z</updated>
		
		<summary type="html">&lt;p&gt;Baraboom: /* Apache 2 Configuration */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;If you've got a busy webserver, you'll soon find yourself looking at tweaking the Apache configuration to get more. As it is, most Apache installs are configured for testing / development vs production use.&lt;br /&gt;
&lt;br /&gt;
==MPM==&lt;br /&gt;
&lt;br /&gt;
By default, the httpd.conf has MPM specific settings for all possible MPM choices. However, since this choice is made at compile-time, all but one of these MPM specific can be safely removed. The default (and usually the recommended) MPM is prefork.&lt;br /&gt;
&lt;br /&gt;
 ##&lt;br /&gt;
 ## Server-Pool Size Regulation (MPM specific)&lt;br /&gt;
 ##&lt;br /&gt;
&lt;br /&gt;
===Prefork===&lt;br /&gt;
&lt;br /&gt;
This is the default MPM and will work fine for most applications.&lt;br /&gt;
&lt;br /&gt;
Default:&lt;br /&gt;
 # prefork MPM&lt;br /&gt;
 # StartServers: number of server processes to start&lt;br /&gt;
 # MinSpareServers: minimum number of server processes which are kept spare&lt;br /&gt;
 # MaxSpareServers: maximum number of server processes which are kept spare&lt;br /&gt;
 # MaxClients: maximum number of server processes allowed to start&lt;br /&gt;
 # MaxRequestsPerChild: maximum number of requests a server process serves&lt;br /&gt;
 &amp;lt;IfModule prefork.c&amp;gt;&lt;br /&gt;
 StartServers         5&lt;br /&gt;
 MinSpareServers      5&lt;br /&gt;
 MaxSpareServers     10&lt;br /&gt;
 MaxClients         150&lt;br /&gt;
 MaxRequestsPerChild  0&lt;br /&gt;
 &amp;lt;/IfModule&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Tweaked:&lt;br /&gt;
 StartServers        10&lt;br /&gt;
 MinSpareServers     10&lt;br /&gt;
 MaxSpareServers     20&lt;br /&gt;
 MaxClients         250&lt;br /&gt;
 MaxRequestsPerChild 15000&lt;br /&gt;
&lt;br /&gt;
'''StartServers, MinSpareServers, MaxSpareServers'''   &lt;br /&gt;
Creating a child process can be one of the most expensive in terms of CPU usage. Experiment with raising these values... as a start, you can probably safely double them and go from there. During traffic spikes, the server will have more available, idle child processes already created, which should help reduce load and keep the server busier serving content than spawning new servers when needed.&lt;br /&gt;
&lt;br /&gt;
'''MaxClients'''   &lt;br /&gt;
With a busy website you may start reaching the default MaxClients, in which case everyone else is locked out. This error will show up in your error logs. Please note that there is a hard limit of 256 for this directive. Raising it requires setting a compile-time option and reinstalling. Still, 256 is much heftier than 150, so this may work out fine.&lt;br /&gt;
&lt;br /&gt;
'''MaxRequestsPerChild'''   &lt;br /&gt;
Leaving this at 0 means a child never dies... once its created it will serve an unlimited number of requests until the main daemon kills it off during traffic lulls. Setting this to a high number has the added benefit of periodically refreshing the pool of child processes and keep memory leakage to a minimum.&lt;br /&gt;
&lt;br /&gt;
===Worker===&lt;br /&gt;
&lt;br /&gt;
In order to try out the worker MPM, you must re-install Apache2 with different MAKE_ARGS. For the brave, please see this page: [[Apache2 with the Worker MPM]].&lt;br /&gt;
&lt;br /&gt;
==KeepAlives==&lt;br /&gt;
&lt;br /&gt;
The KeepAlives directive is enabled by default; to quote from the Apache documentation:&lt;br /&gt;
 The Keep-Alive extension to HTTP/1.0 and the persistent connection feature of &lt;br /&gt;
 HTTP/1.1 provide long-lived HTTP sessions which allow multiple requests to be &lt;br /&gt;
 sent over the same TCP connection. In some cases this has been shown to result&lt;br /&gt;
 in an almost 50% speedup in latency times for HTML documents with many images. &lt;br /&gt;
&lt;br /&gt;
Which is a good thing, if you want fast pages and have a strong server to handle it. If you're more concerned with availability than speed, or are running Apache on a less-than-stellar machine, you may get better performance (cpu/processor-wise, at least,) by turning KeepAlives off:&lt;br /&gt;
&lt;br /&gt;
Default:&lt;br /&gt;
 KeepAlives On&lt;br /&gt;
&lt;br /&gt;
Tweaked:&lt;br /&gt;
 KeepAlives Off&lt;/div&gt;</summary>
		<author><name>Baraboom</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/Apache2,_Installing</id>
		<title>Apache2, Installing</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/Apache2,_Installing"/>
				<updated>2005-10-20T13:10:34Z</updated>
		
		<summary type="html">&lt;p&gt;Baraboom: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Apache 2.0'''&lt;br /&gt;
&lt;br /&gt;
See also [[Apache]] - [[Apache Controlling]] - [[Configuring Apache]]&lt;br /&gt;
&lt;br /&gt;
We'll walk through the installation for Apache2. It's very simple to install - in earlier versions of Apache, you had to install either mods or different versions depending on whether you wanted to enable certain features (ssl, etc). With Apache2, they are incorporated into the main package, and enabled or disabled when you configure Apache. There are a few exceptions, but most everything you'll need to run a modern feature-rich webserver is included with the Apache2 port.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' As always, before installing any ports, update your ports tree with [[cvsup]] if it has been a while.&lt;br /&gt;
&lt;br /&gt;
Let's get started:&lt;br /&gt;
&lt;br /&gt;
 &amp;gt;'''su'''&lt;br /&gt;
 Password: (enter root password)&lt;br /&gt;
 oyabun# '''cd /usr/ports/www'''&lt;br /&gt;
 oyabun# '''ls | grep apache'''&lt;br /&gt;
 apache-contrib&lt;br /&gt;
 apache-forrest&lt;br /&gt;
 apache-jserv&lt;br /&gt;
 apache13&lt;br /&gt;
 apache13+ipv6&lt;br /&gt;
 apache13-fp&lt;br /&gt;
 apache13-modperl&lt;br /&gt;
 apache13-modssl&lt;br /&gt;
 apache13-modssl+ipv6&lt;br /&gt;
 apache13-ssl&lt;br /&gt;
 apache2&lt;br /&gt;
 mod_jk-apache2&lt;br /&gt;
 mod_jk2-apache2&lt;br /&gt;
 oyabun# '''cd apache2'''&lt;br /&gt;
 oyabun# '''make install clean'''&lt;br /&gt;
&lt;br /&gt;
First, I changed to the [[superuser]], as we'll be installing software. I changed directory to the '''www''' section of the ports tree, and filtered a listing of that directories contents for all ports that contained the word 'apache' using [[grep]]. The one we want is '''apache2'''. I then changed to that directory, and issued the [[make]] command, with options '''install''' and '''clean''' specified, to install the software and clean up the makefiles when done.&lt;br /&gt;
&lt;br /&gt;
Note that you'll want to check the file /usr/ports/www/apache2/Makefile.doc to see what modules you can build into apache2 -- e.g., [[LDAP]] or [[IPv6]] or threading. To include the one you want, you'd want to build apache like so:&lt;br /&gt;
&lt;br /&gt;
 samizdata# '''make -DWITH_LDAP_MODULE install clean&lt;br /&gt;
&lt;br /&gt;
After a few seconds, minutes, or hours (depending on whether your hardware is going to waste, reasonable, or a throwback to the early 90's), Apache2's installation will be completed, and you'll be faced with this note:&lt;br /&gt;
&lt;br /&gt;
 Available variables you add/set to /etc/rc.conf.&lt;br /&gt;
 - apache2_enable (bool):      Set to &amp;quot;NO&amp;quot; by default.&lt;br /&gt;
                               Set it to &amp;quot;YES&amp;quot; to enable apache2.&lt;br /&gt;
 - apache2ssl_enable (bool):   Set to &amp;quot;NO&amp;quot; by default.&lt;br /&gt;
                               Set it to &amp;quot;YES&amp;quot; to start apache with SSL&lt;br /&gt;
                               (if &amp;lt;IfDefined SSL&amp;gt; exists in httpd.conf).&lt;br /&gt;
 - apache2limits_enable (bool):Set to &amp;quot;NO&amp;quot; by default.&lt;br /&gt;
                               Set it to yes to run `limits $limits_args`&lt;br /&gt;
                               just before apache starts.&lt;br /&gt;
 - apache2_flags (str):        Set to &amp;quot;&amp;quot; by default.&lt;br /&gt;
                               Extra flags passed to start command.&lt;br /&gt;
 - apache2limits_args (str):   Default to &amp;quot;-e -C daemon&amp;quot;&lt;br /&gt;
                               Arguments of pre-start limits run.&lt;br /&gt;
&lt;br /&gt;
As you can see from this, ssl suport is included in Apache2, as opposed to Apache 1.3. I included this output because I have a bad habit of scrolling important stuff like this out of the buffer after installations, and it's nice to have it saved here. You don't need to worry about any of this until you configure Apache.&lt;br /&gt;
&lt;br /&gt;
So, Apache2 is now installed, you just need to actually set it up.&lt;br /&gt;
&lt;br /&gt;
Please visit [[Apache Controlling]] to learn how to actually start your webserver.&lt;br /&gt;
[[Category:Common Tasks]]&lt;br /&gt;
&lt;br /&gt;
[[Category:FreeBSD for Servers]]&lt;/div&gt;</summary>
		<author><name>Baraboom</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/Apache,_Configuring</id>
		<title>Apache, Configuring</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/Apache,_Configuring"/>
				<updated>2005-10-20T13:04:56Z</updated>
		
		<summary type="html">&lt;p&gt;Baraboom: /* Prefork */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Apache 2 Configuration==&lt;br /&gt;
&lt;br /&gt;
If you've got a busy webserver, you'll soon find yourself looking at tweaking the Apache configuration to get more. As it is, most Apache installs are configured for testing / development vs production use.&lt;br /&gt;
&lt;br /&gt;
==MPM==&lt;br /&gt;
&lt;br /&gt;
By default, the httpd.conf has MPM specific settings for all possible MPM choices. However, since this choice is made at compile-time, all but one of these MPM specific can be safely removed. The default (and usually the recommended) MPM is prefork.&lt;br /&gt;
&lt;br /&gt;
 ##&lt;br /&gt;
 ## Server-Pool Size Regulation (MPM specific)&lt;br /&gt;
 ##&lt;br /&gt;
&lt;br /&gt;
===Prefork===&lt;br /&gt;
&lt;br /&gt;
This is the default MPM and will work fine for most applications.&lt;br /&gt;
&lt;br /&gt;
Default:&lt;br /&gt;
 # prefork MPM&lt;br /&gt;
 # StartServers: number of server processes to start&lt;br /&gt;
 # MinSpareServers: minimum number of server processes which are kept spare&lt;br /&gt;
 # MaxSpareServers: maximum number of server processes which are kept spare&lt;br /&gt;
 # MaxClients: maximum number of server processes allowed to start&lt;br /&gt;
 # MaxRequestsPerChild: maximum number of requests a server process serves&lt;br /&gt;
 &amp;lt;IfModule prefork.c&amp;gt;&lt;br /&gt;
 StartServers         5&lt;br /&gt;
 MinSpareServers      5&lt;br /&gt;
 MaxSpareServers     10&lt;br /&gt;
 MaxClients         150&lt;br /&gt;
 MaxRequestsPerChild  0&lt;br /&gt;
 &amp;lt;/IfModule&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Tweaked:&lt;br /&gt;
 StartServers        10&lt;br /&gt;
 MinSpareServers     10&lt;br /&gt;
 MaxSpareServers     20&lt;br /&gt;
 MaxClients         250&lt;br /&gt;
 MaxRequestsPerChild 15000&lt;br /&gt;
&lt;br /&gt;
'''StartServers, MinSpareServers, MaxSpareServers'''   &lt;br /&gt;
Creating a child process can be one of the most expensive in terms of CPU usage. Experiment with raising these values... as a start, you can probably safely double them and go from there. During traffic spikes, the server will have more available, idle child processes already created, which should help reduce load and keep the server busier serving content than spawning new servers when needed.&lt;br /&gt;
&lt;br /&gt;
'''MaxClients'''   &lt;br /&gt;
With a busy website you may start reaching the default MaxClients, in which case everyone else is locked out. This error will show up in your error logs. Please note that there is a hard limit of 256 for this directive. Raising it requires setting a compile-time option and reinstalling. Still, 256 is much heftier than 150, so this may work out fine.&lt;br /&gt;
&lt;br /&gt;
'''MaxRequestsPerChild'''   &lt;br /&gt;
Leaving this at 0 means a child never dies... once its created it will serve an unlimited number of requests until the main daemon kills it off during traffic lulls. Setting this to a high number has the added benefit of periodically refreshing the pool of child processes and keep memory leakage to a minimum.&lt;br /&gt;
&lt;br /&gt;
===Worker===&lt;br /&gt;
&lt;br /&gt;
In order to try out the worker MPM, you must re-install Apache2 with different MAKE_ARGS. For the brave, please see this page: [[Apache2 with the Worker MPM]].&lt;br /&gt;
&lt;br /&gt;
==KeepAlives==&lt;br /&gt;
&lt;br /&gt;
The KeepAlives directive is enabled by default; to quote from the Apache documentation:&lt;br /&gt;
 The Keep-Alive extension to HTTP/1.0 and the persistent connection feature of &lt;br /&gt;
 HTTP/1.1 provide long-lived HTTP sessions which allow multiple requests to be &lt;br /&gt;
 sent over the same TCP connection. In some cases this has been shown to result&lt;br /&gt;
 in an almost 50% speedup in latency times for HTML documents with many images. &lt;br /&gt;
&lt;br /&gt;
Which is a good thing, if you want fast pages and have a strong server to handle it. If you're more concerned with availability than speed, or are running Apache on a less-than-stellar machine, you may get better performance (cpu/processor-wise, at least,) by turning KeepAlives off:&lt;br /&gt;
&lt;br /&gt;
Default:&lt;br /&gt;
 KeepAlives On&lt;br /&gt;
&lt;br /&gt;
Tweaked:&lt;br /&gt;
 KeepAlives Off&lt;/div&gt;</summary>
		<author><name>Baraboom</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/Apache,_Configuring</id>
		<title>Apache, Configuring</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/Apache,_Configuring"/>
				<updated>2005-10-20T12:54:45Z</updated>
		
		<summary type="html">&lt;p&gt;Baraboom: /* MPM */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Apache 2 Configuration==&lt;br /&gt;
&lt;br /&gt;
If you've got a busy webserver, you'll soon find yourself looking at tweaking the Apache configuration to get more. As it is, most Apache installs are configured for testing / development vs production use.&lt;br /&gt;
&lt;br /&gt;
==MPM==&lt;br /&gt;
&lt;br /&gt;
By default, the httpd.conf has MPM specific settings for all possible MPM choices. However, since this choice is made at compile-time, all but one of these MPM specific can be safely removed. The default (and usually the recommended) MPM is prefork.&lt;br /&gt;
&lt;br /&gt;
 ##&lt;br /&gt;
 ## Server-Pool Size Regulation (MPM specific)&lt;br /&gt;
 ##&lt;br /&gt;
&lt;br /&gt;
===Prefork===&lt;br /&gt;
&lt;br /&gt;
This is the default MPM and will work fine for most applications.&lt;br /&gt;
&lt;br /&gt;
Default:&lt;br /&gt;
 # prefork MPM&lt;br /&gt;
 # StartServers: number of server processes to start&lt;br /&gt;
 # MinSpareServers: minimum number of server processes which are kept spare&lt;br /&gt;
 # MaxSpareServers: maximum number of server processes which are kept spare&lt;br /&gt;
 # MaxClients: maximum number of server processes allowed to start&lt;br /&gt;
 # MaxRequestsPerChild: maximum number of requests a server process serves&lt;br /&gt;
 &amp;lt;IfModule prefork.c&amp;gt;&lt;br /&gt;
 StartServers         5&lt;br /&gt;
 MinSpareServers      5&lt;br /&gt;
 MaxSpareServers     10&lt;br /&gt;
 MaxClients         150&lt;br /&gt;
 MaxRequestsPerChild  0&lt;br /&gt;
 &amp;lt;/IfModule&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Tweaked:&lt;br /&gt;
 StartServers        10&lt;br /&gt;
 MinSpareServers     10&lt;br /&gt;
 MaxSpareServers     20&lt;br /&gt;
 MaxClients         250&lt;br /&gt;
 MaxRequestsPerChild 15000&lt;br /&gt;
&lt;br /&gt;
StartServers,&lt;br /&gt;
Creating a child process can be one of the most expensive in terms of CPU usage. With a busy website you may start reaching the default MaxClients, in which case everyone else is locked out. This error will show up in your error logs.&lt;br /&gt;
&lt;br /&gt;
===Worker===&lt;br /&gt;
&lt;br /&gt;
In order to try out the worker MPM, you must re-install Apache2 with different MAKE_ARGS. For the brave, please see this page: [[Apache2 with the Worker MPM]].&lt;br /&gt;
&lt;br /&gt;
==KeepAlives==&lt;br /&gt;
&lt;br /&gt;
The KeepAlives directive is enabled by default; to quote from the Apache documentation:&lt;br /&gt;
 The Keep-Alive extension to HTTP/1.0 and the persistent connection feature of &lt;br /&gt;
 HTTP/1.1 provide long-lived HTTP sessions which allow multiple requests to be &lt;br /&gt;
 sent over the same TCP connection. In some cases this has been shown to result&lt;br /&gt;
 in an almost 50% speedup in latency times for HTML documents with many images. &lt;br /&gt;
&lt;br /&gt;
Which is a good thing, if you want fast pages and have a strong server to handle it. If you're more concerned with availability than speed, or are running Apache on a less-than-stellar machine, you may get better performance (cpu/processor-wise, at least,) by turning KeepAlives off:&lt;br /&gt;
&lt;br /&gt;
Default:&lt;br /&gt;
 KeepAlives On&lt;br /&gt;
&lt;br /&gt;
Tweaked:&lt;br /&gt;
 KeepAlives Off&lt;/div&gt;</summary>
		<author><name>Baraboom</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/Apache,_Configuring</id>
		<title>Apache, Configuring</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/Apache,_Configuring"/>
				<updated>2005-10-20T12:49:57Z</updated>
		
		<summary type="html">&lt;p&gt;Baraboom: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Apache 2 Configuration==&lt;br /&gt;
&lt;br /&gt;
If you've got a busy webserver, you'll soon find yourself looking at tweaking the Apache configuration to get more. As it is, most Apache installs are configured for testing / development vs production use.&lt;br /&gt;
&lt;br /&gt;
==MPM==&lt;br /&gt;
&lt;br /&gt;
By default, the httpd.conf has MPM specific settings for all possible MPM choices. However, since this choice is made at compile-time, all but one of these MPM specific can be safely removed. The default (and usually the recommended) MPM is prefork.&lt;br /&gt;
&lt;br /&gt;
 ##&lt;br /&gt;
 ## Server-Pool Size Regulation (MPM specific)&lt;br /&gt;
 ##&lt;br /&gt;
&lt;br /&gt;
==KeepAlives==&lt;br /&gt;
&lt;br /&gt;
The KeepAlives directive is enabled by default; to quote from the Apache documentation:&lt;br /&gt;
 The Keep-Alive extension to HTTP/1.0 and the persistent connection feature of &lt;br /&gt;
 HTTP/1.1 provide long-lived HTTP sessions which allow multiple requests to be &lt;br /&gt;
 sent over the same TCP connection. In some cases this has been shown to result&lt;br /&gt;
 in an almost 50% speedup in latency times for HTML documents with many images. &lt;br /&gt;
&lt;br /&gt;
Which is a good thing, if you want fast pages and have a strong server to handle it. If you're more concerned with availability than speed, or are running Apache on a less-than-stellar machine, you may get better performance (cpu/processor-wise, at least,) by turning KeepAlives off:&lt;br /&gt;
&lt;br /&gt;
Default:&lt;br /&gt;
 KeepAlives On&lt;br /&gt;
&lt;br /&gt;
Tweaked:&lt;br /&gt;
 KeepAlives Off&lt;/div&gt;</summary>
		<author><name>Baraboom</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/Talk:Apache,_Configuring</id>
		<title>Talk:Apache, Configuring</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/Talk:Apache,_Configuring"/>
				<updated>2005-10-16T11:56:02Z</updated>
		
		<summary type="html">&lt;p&gt;Baraboom: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Seeing as how this page was blank before, I can't say you did wrong to it but this entry is pretty useless, Barroom. Thanks for the newsyslog.conf entry though.&lt;br /&gt;
&lt;br /&gt;
--[[User:Dave|Dave]] 20:11, 15 Oct 2005 (EDT)&lt;br /&gt;
&lt;br /&gt;
hehe yea i typed that and ran out of steam for the day... but I have added a bit more text to the page, maybe get some other people adding / improving upon it. apache configuration covers quite a range of stuff... what i'd like to do is get some information goin about worker mpm, mod_fastcgi, php - any suggestions on how to organize it in here?&lt;/div&gt;</summary>
		<author><name>Baraboom</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/Apache,_Configuring</id>
		<title>Apache, Configuring</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/Apache,_Configuring"/>
				<updated>2005-10-16T11:52:02Z</updated>
		
		<summary type="html">&lt;p&gt;Baraboom: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Apache 2 Configuration==&lt;br /&gt;
&lt;br /&gt;
If you've got a busy webserver, you'll soon find yourself looking at tweaking the Apache configuration to get more. As it is, most Apache installs are configured for testing / development vs production use.&lt;br /&gt;
&lt;br /&gt;
Default:&lt;br /&gt;
 KeepAlives On&lt;br /&gt;
&lt;br /&gt;
Tweaked:&lt;br /&gt;
 KeepAlives Off&lt;/div&gt;</summary>
		<author><name>Baraboom</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/Sudo,_configuring</id>
		<title>Sudo, configuring</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/Sudo,_configuring"/>
				<updated>2005-10-16T11:47:22Z</updated>
		
		<summary type="html">&lt;p&gt;Baraboom: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;First, install [[sudo]]. [[su]] to root and go to /usr/ports and then find out where the port is:&lt;br /&gt;
&lt;br /&gt;
 [dave]@deus ~ % sudo&lt;br /&gt;
 -bash: sudo: command not found&lt;br /&gt;
 [dave]@deus ~ % su -&lt;br /&gt;
 Password:&lt;br /&gt;
 [root]@deus ~ # cd /usr/ports &amp;amp;&amp;amp; make search name=sudo&lt;br /&gt;
 Port:   sudo-1.6.7.5&lt;br /&gt;
 Path:   /usr/ports/security/sudo&lt;br /&gt;
 Info:   Allow others to run commands as root&lt;br /&gt;
 Maint:  mharo@FreeBSD.org&lt;br /&gt;
 B-deps:&lt;br /&gt;
 R-deps:&lt;br /&gt;
 &lt;br /&gt;
 [root]@deus /usr/ports # cd security/sudo&lt;br /&gt;
 [root]@deus /usr/ports/security/sudo # make install clean&lt;br /&gt;
&lt;br /&gt;
Once it's installed, you'll need to run [[visudo]] since there's no other way to edit /etc/sudoers (well, you can use another editor, but it just won't work.) &lt;br /&gt;
&lt;br /&gt;
Note that [[visudo]] doesn't actually call the [[vi]] editor, just your default editor; if that ''happens'' to be [[vi]] then it will come up. Otherwise, your regular editor will come up.&lt;br /&gt;
&lt;br /&gt;
/etc/sudoers has one entry in it:&lt;br /&gt;
 root ALL=ALL(ALL) ALL&lt;br /&gt;
which doesn't really explain what those ALLs mean in context; so often a lot of folks will set the sudoers to give ALL=ALL(ALL) ALL to every user they add. That's nice, but you're giving all of root's power away. You might as well give users the root password and save them the hassle of using [[sudo]] at all.&lt;br /&gt;
&lt;br /&gt;
The explanation:&lt;br /&gt;
 sudo-user machine=(effective user rights) command&lt;br /&gt;
&lt;br /&gt;
So, if I want to give Jimbo [[root]] access on my server, Pete root on my laptop and Light only to have access to [[shutdown]] on all my machines, my sudoers would look like:&lt;br /&gt;
 root ALL=ALL(ALL) ALL&lt;br /&gt;
 jimbo ALL=samizdata.mydomain.tld(ALL) ALL&lt;br /&gt;
 peet  ALL=deus(ALL) ALL&lt;br /&gt;
 light ALL=ALL(ALL) /sbin/shutdown&lt;br /&gt;
&lt;br /&gt;
Finally, if you just want to give yourself [[root]] access on your server via sudo with no password, your sudoers might look like:&lt;br /&gt;
 root ALL=ALL(ALL) ALL&lt;br /&gt;
 yourself ALL=(ALL) NOPASSWD: ALL&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' remember that setting sudo rights for multiple machines in a single '''sudoers''' file is only meaningful if that file is actually shared or distributed across those multiple machines.  Simply writing permissions for the machine samizdata ''on'' the machine deus isn't going to do anything useful by itself. You would need to copy the file contents over to all the machines that are listed (and then [[kill]] -HUP the sudo process, if it's running,) in order to make the changes meaningful.&lt;br /&gt;
&lt;br /&gt;
==Using Aliases to make life easier==&lt;br /&gt;
&lt;br /&gt;
You can make groups within the sudoers file so that you don't have to type more than you need to. Follow this format:&lt;br /&gt;
 &lt;br /&gt;
 '''User_Alias''' allows you to define a group of users&lt;br /&gt;
 '''Runas_Alias''' allows you to define the daemon or user the command can run as&lt;br /&gt;
 '''Host_Alias''' allows you to define a group of hosts&lt;br /&gt;
 '''Cmnd_Alias''' allows you to define which commands (full path '''must''' be given) are in a group&lt;br /&gt;
 &lt;br /&gt;
 You ''can'' use already existing system groups, but you have to add the prefix % (e.g., %wheel)&lt;br /&gt;
&lt;br /&gt;
As an example, if my /etc/sudoers showed:&lt;br /&gt;
&lt;br /&gt;
 User_Alias ADMINS=jimbo&lt;br /&gt;
 User_Alias DNSADMINS=peet&lt;br /&gt;
 User_Alias DHCPADMINS=light&lt;br /&gt;
 &lt;br /&gt;
 Runas_Alias DAEMONS=bind,dhcpd,sshd&lt;br /&gt;
 &lt;br /&gt;
 Host_Alias NAMESERVERS=ns1.samizdata.mydomain.tld,ns2.samizdata.mydomain.tld&lt;br /&gt;
 Host_Alias DHCPSERVERS=dhcp.mydomain.tld,dhcp2.mydomain.tld&lt;br /&gt;
 &lt;br /&gt;
 Cmnd_Alias DNS=/usr/local/sbin/rndc,/usr/local/sbin/bind&lt;br /&gt;
 Cmnd_Alias DHCP=/usr/local/sbin/dhcpd&lt;br /&gt;
&lt;br /&gt;
at the top, then I could add these lines to the bottom:&lt;br /&gt;
&lt;br /&gt;
 ADMINS ALL=(ALL) DNS,DHCP&lt;br /&gt;
 DNSADMINS NAMESERVERS=(DAEMONS) DNS&lt;br /&gt;
 DHCPADMINS DHCPSERVERS=(DAEMONS) DHCP&lt;br /&gt;
&lt;br /&gt;
Note that there are no spaces between the users and commas, likewise, servers and commands only have a comma seperating them -- '''no spaces'''. This would essentially give jimbo rights to do root-priviledge stuff with any server, as any daemon, but only using the commands that '''DNS''' and '''DHCP''' specify; peet would only get root access to NAMESERVERS, only run as the DAEMONS, and only use the commands in DNS. Light would only get root access to DHCPSERVERS, run as DAEMONS and only be able to run /usr/local/sbin/dhcpd.&lt;br /&gt;
&lt;br /&gt;
This is ideal if you have a) a lot of servers and/or b) a lot of admins with specific functions, that don't need complete access to the machine, but do need some sort of administrative rights on it.&lt;br /&gt;
&lt;br /&gt;
[[Category:System Commands]] [[Category:Ports and Packages]] [[Category:Configuring FreeBSD]]&lt;/div&gt;</summary>
		<author><name>Baraboom</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/Sudo,_configuring</id>
		<title>Sudo, configuring</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/Sudo,_configuring"/>
				<updated>2005-10-16T11:46:45Z</updated>
		
		<summary type="html">&lt;p&gt;Baraboom: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;First, install [[sudo]]. [[su]] to root and go to /usr/ports and then find out where the port is:&lt;br /&gt;
&lt;br /&gt;
 [dave]@deus ~ % sudo&lt;br /&gt;
 -bash: sudo: command not found&lt;br /&gt;
 [dave]@deus ~ % su -&lt;br /&gt;
 Password:&lt;br /&gt;
 [root]@deus ~ # cd /usr/ports &amp;amp;&amp;amp; make search name=sudo&lt;br /&gt;
 Port:   sudo-1.6.7.5&lt;br /&gt;
 Path:   /usr/ports/security/sudo&lt;br /&gt;
 Info:   Allow others to run commands as root&lt;br /&gt;
 Maint:  mharo@FreeBSD.org&lt;br /&gt;
 B-deps:&lt;br /&gt;
 R-deps:&lt;br /&gt;
 &lt;br /&gt;
 [root]@deus /usr/ports # cd security/sudo&lt;br /&gt;
 [root]@deus /usr/ports/security/sudo # make install clean&lt;br /&gt;
&lt;br /&gt;
Once it's installed, you'll need to run [[visudo]] since there's no other way to edit /etc/sudoers (well, you can use another editor, but it just won't work.) &lt;br /&gt;
&lt;br /&gt;
Note that [[visudo]] doesn't actually call the [[vi]] editor, just your default editor; if that ''happens'' to be [[vi]] then it will come up. Otherwise, your regular editor will come up.&lt;br /&gt;
&lt;br /&gt;
/etc/sudoers has one entry in it:&lt;br /&gt;
 root ALL=ALL(ALL) ALL&lt;br /&gt;
which doesn't really explain what those ALLs mean in context; so often a lot of folks will set the sudoers to give ALL=ALL(ALL) ALL to every user they add. That's nice, but you're giving all of root's power away. You might as well give users the root password and save them the hassle of using [[sudo]] at all.&lt;br /&gt;
&lt;br /&gt;
The explanation:&lt;br /&gt;
 sudo-user machine=(effective user rights) command&lt;br /&gt;
&lt;br /&gt;
So, if I want to give Jimbo [[root]] access on my server, Pete root on my laptop and Light only to have access to [[shutdown]] on all my machines, my sudoers would look like:&lt;br /&gt;
 root ALL=ALL(ALL) ALL&lt;br /&gt;
 jimbo ALL=samizdata.mydomain.tld(ALL) ALL&lt;br /&gt;
 peet  ALL=deus(ALL) ALL&lt;br /&gt;
 light ALL=ALL(ALL) /sbin/shutdown&lt;br /&gt;
&lt;br /&gt;
Finally, if you just want to give yourself [[root]] access on your server via sudo with no password, your sudoers might look like:&lt;br /&gt;
 root ALL=ALL(ALL) ALL&lt;br /&gt;
 convoy ALL=(ALL) NOPASSWD: ALL&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' remember that setting sudo rights for multiple machines in a single '''sudoers''' file is only meaningful if that file is actually shared or distributed across those multiple machines.  Simply writing permissions for the machine samizdata ''on'' the machine deus isn't going to do anything useful by itself. You would need to copy the file contents over to all the machines that are listed (and then [[kill]] -HUP the sudo process, if it's running,) in order to make the changes meaningful.&lt;br /&gt;
&lt;br /&gt;
==Using Aliases to make life easier==&lt;br /&gt;
&lt;br /&gt;
You can make groups within the sudoers file so that you don't have to type more than you need to. Follow this format:&lt;br /&gt;
 &lt;br /&gt;
 '''User_Alias''' allows you to define a group of users&lt;br /&gt;
 '''Runas_Alias''' allows you to define the daemon or user the command can run as&lt;br /&gt;
 '''Host_Alias''' allows you to define a group of hosts&lt;br /&gt;
 '''Cmnd_Alias''' allows you to define which commands (full path '''must''' be given) are in a group&lt;br /&gt;
 &lt;br /&gt;
 You ''can'' use already existing system groups, but you have to add the prefix % (e.g., %wheel)&lt;br /&gt;
&lt;br /&gt;
As an example, if my /etc/sudoers showed:&lt;br /&gt;
&lt;br /&gt;
 User_Alias ADMINS=jimbo&lt;br /&gt;
 User_Alias DNSADMINS=peet&lt;br /&gt;
 User_Alias DHCPADMINS=light&lt;br /&gt;
 &lt;br /&gt;
 Runas_Alias DAEMONS=bind,dhcpd,sshd&lt;br /&gt;
 &lt;br /&gt;
 Host_Alias NAMESERVERS=ns1.samizdata.mydomain.tld,ns2.samizdata.mydomain.tld&lt;br /&gt;
 Host_Alias DHCPSERVERS=dhcp.mydomain.tld,dhcp2.mydomain.tld&lt;br /&gt;
 &lt;br /&gt;
 Cmnd_Alias DNS=/usr/local/sbin/rndc,/usr/local/sbin/bind&lt;br /&gt;
 Cmnd_Alias DHCP=/usr/local/sbin/dhcpd&lt;br /&gt;
&lt;br /&gt;
at the top, then I could add these lines to the bottom:&lt;br /&gt;
&lt;br /&gt;
 ADMINS ALL=(ALL) DNS,DHCP&lt;br /&gt;
 DNSADMINS NAMESERVERS=(DAEMONS) DNS&lt;br /&gt;
 DHCPADMINS DHCPSERVERS=(DAEMONS) DHCP&lt;br /&gt;
&lt;br /&gt;
Note that there are no spaces between the users and commas, likewise, servers and commands only have a comma seperating them -- '''no spaces'''. This would essentially give jimbo rights to do root-priviledge stuff with any server, as any daemon, but only using the commands that '''DNS''' and '''DHCP''' specify; peet would only get root access to NAMESERVERS, only run as the DAEMONS, and only use the commands in DNS. Light would only get root access to DHCPSERVERS, run as DAEMONS and only be able to run /usr/local/sbin/dhcpd.&lt;br /&gt;
&lt;br /&gt;
This is ideal if you have a) a lot of servers and/or b) a lot of admins with specific functions, that don't need complete access to the machine, but do need some sort of administrative rights on it.&lt;br /&gt;
&lt;br /&gt;
[[Category:System Commands]] [[Category:Ports and Packages]] [[Category:Configuring FreeBSD]]&lt;/div&gt;</summary>
		<author><name>Baraboom</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/User:Baraboom</id>
		<title>User:Baraboom</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/User:Baraboom"/>
				<updated>2005-10-15T23:47:45Z</updated>
		
		<summary type="html">&lt;p&gt;Baraboom: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;i hate red links&lt;/div&gt;</summary>
		<author><name>Baraboom</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/Apache,_Configuring</id>
		<title>Apache, Configuring</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/Apache,_Configuring"/>
				<updated>2005-10-15T23:46:43Z</updated>
		
		<summary type="html">&lt;p&gt;Baraboom: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt; KeepAlives Off&lt;/div&gt;</summary>
		<author><name>Baraboom</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/Newsyslog.conf</id>
		<title>Newsyslog.conf</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/Newsyslog.conf"/>
				<updated>2005-10-15T23:45:29Z</updated>
		
		<summary type="html">&lt;p&gt;Baraboom: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;(Usually located at '''/etc/newsyslog.conf''')&lt;br /&gt;
&lt;br /&gt;
Controls behavior of [[newsyslog]], the utility which periodically (in most systems, once per hour) reviews all logs mentioned in this file and archives / rotates / trims those logs in accordance with specifications contained within.  See '''man newsyslog''' for lots of detailed info on setting this up.&lt;br /&gt;
&lt;br /&gt;
==Rotating Apache Logs==&lt;br /&gt;
 /path/to/some.log root:wheel 600 3 * $D0 JB /var/run/httpd.pid 30&lt;br /&gt;
&lt;br /&gt;
This line will rotate the log, maintain the privileges, keep 3 old rotations, rotate daily at midnight, treat the log as a binary file, compress it with bzip2 and restart apache with signal 30. There are obviously a lot of options you can change to suit your needs but the 'B' flag and the '30' signal are recommended for apache logs.&lt;br /&gt;
&lt;br /&gt;
[[Category:Important Config Files]]&lt;/div&gt;</summary>
		<author><name>Baraboom</name></author>	</entry>

	<entry>
		<id>http://freebsdwiki.net/index.php/Newsyslog.conf</id>
		<title>Newsyslog.conf</title>
		<link rel="alternate" type="text/html" href="http://freebsdwiki.net/index.php/Newsyslog.conf"/>
				<updated>2005-10-15T23:45:09Z</updated>
		
		<summary type="html">&lt;p&gt;Baraboom: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;(Usually located at '''/etc/newsyslog.conf''')&lt;br /&gt;
&lt;br /&gt;
Controls behavior of [[newsyslog]], the utility which periodically (in most systems, once per hour) reviews all logs mentioned in this file and archives / rotates / trims those logs in accordance with specifications contained within.  See '''man newsyslog''' for lots of detailed info on setting this up.&lt;br /&gt;
&lt;br /&gt;
==Rotating Apache Logs==&lt;br /&gt;
 /path/to/some.log root:wheel 600 3 * $D0 JB /var/run/httpd.pid 30&lt;br /&gt;
&lt;br /&gt;
This line will rotate the log, maintain the privileges, keep 3 old rotations, rotate daily at midnight, treat the log as a binary file, compress it with bzip2 and restart apache with signal 30.&lt;br /&gt;
&lt;br /&gt;
There are obviously a lot of options you can change to suit your needs but the 'B' flag and the '30' signal are recommended for apache logs.&lt;br /&gt;
&lt;br /&gt;
[[Category:Important Config Files]]&lt;/div&gt;</summary>
		<author><name>Baraboom</name></author>	</entry>

	</feed>