Revision [3661]

Last edited on 2010-03-10 18:47:05 by KenFong
Additions:
==[[ApacheBW mod_bw]]==


Revision [3562]

Edited on 2009-10-29 08:37:05 by WikiAdmin
Additions:
==[[ApacheAuth Authentication]]==
Deletions:
=== htaccess ===
One of the things that I keep forgetting, is how to setup a password for an URL.
First, make sure the following is in the corresponding directive block
AllowOverride AuthConfig
Then, create an .htaccess file in the appropriate directory, or put this under the block in your apache config.
AuthType Basic
AuthName "Password Required"
AuthUserFile /xxx/.htpasswd
AuthGroupFile /xxx/.htgroup OR /dev/null

require valid-user
#require group admins
Allow from 127.0.0.1
SetEnvIf Request_URI "^/robots\.txt$" allow_this
Allow from env=allow_this
Satisfy Any

Then using the htpasswd utility, create the .htpasswd file
htpasswd -c .htpasswd USER_NAME
If user group is used, create the .htgroup like the following
admins: rich daniel allan
Unless you make changes in step 1, there's no need to restart apache.


Revision [3554]

Edited on 2009-10-21 20:31:06 by WikiAdmin
Additions:
SetEnvIf Request_URI "^/robots\.txt$" allow_this
Allow from env=allow_this


Revision [3537]

Edited on 2009-10-06 19:18:01 by WikiAdmin
Additions:
===Apache Web Server===
Deletions:
===Go figure===
What does these do?

AcceptFilter http none
AcceptFilter https none


Revision [2367]

Edited on 2009-07-08 07:33:23 by WikiAdmin
Additions:
==[[ApacheQOS mod_qos]]==


Revision [2156]

Edited on 2009-01-18 19:25:44 by WikiAdmin
Additions:
Then, create an .htaccess file in the appropriate directory, or put this under the block in your apache config.
require valid-user
#require group admins
Allow from 127.0.0.1
Satisfy Any
Deletions:
Then, create an .htaccess file in the appropriate directory
require valid-user
#require group admins


Revision [2106]

Edited on 2008-12-08 01:24:55 by WikiAdmin
Additions:
RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
From Apache 1.3.34, 2.0.55 and later, one can put this into httpd.conf:
TraceEnable Off
Deletions:
RewriteCond %{REQUEST_METHOD} ^TRACE


Revision [2057]

Edited on 2008-10-27 00:17:01 by WikiAdmin
Additions:
==[[ApacheCoreDumps Core Dumps]]==


Revision [1973]

Edited on 2008-09-26 06:25:29 by WikiAdmin
Additions:
==[[ApacheCache mod_cache]]==


Revision [1971]

Edited on 2008-09-26 05:56:13 by WikiAdmin
Additions:
==[[ApacheTuning Tuning Apache]]==
Deletions:
==[[ApacheTuning Tunning Apache]]==


Revision [1968]

Edited on 2008-09-26 05:55:11 by WikiAdmin
Additions:
==[[ApacheTuning Tunning Apache]]==
Deletions:
=== Tuning apache ===
""







ParameterExplaination
MaxClients Determines how large is each httpd process, then multiple by MaxClients. Should not exceed physical mem
MaxRequestsPerChild number of requests handled per child, do not set it to 0
KeepAlive [On|Off] Tells apache whether to close a connection immediately a request has been filled. If a page contains seberal js, several images, and several of others, turning on KeepAlive will save the time and resource to estabish tcp connections for each and one of those objects. But because connections are maintained for some period of time, apache's resource is not fully used for serving maximum number of clients. In long run, turning on KeepAlive means more MaxClients is required.
KeepAliveTimeout [15] Try set it to short period of time, thus benefit from KeepAlive while not overload server with inactive connections.
MaxKeepAliveRequests [100] - How many requests a client can make within one connection
worker MPM many child processes, each has many threads
BufferedLogs On Writes log to memory and write to disk in batch
ForensicLog filename Writes logs for forensic use
""
* prefork MPM: many child processes, each has 1 thread. Consumes more memory


Revision [1967]

Edited on 2008-09-24 22:57:58 by WikiAdmin
Additions:
===Go figure===
What does these do?

AcceptFilter http none
AcceptFilter https none


Revision [1928]

Edited on 2008-09-05 10:04:58 by WikiAdmin
Additions:
====Traditional vhosts====


Revision [1927]

Edited on 2008-09-05 10:04:27 by WikiAdmin
Additions:
Check out http://httpd.apache.org/docs/2.0/mod/mod_vhost_alias.html. One can setup something like evhost in lighttpd. Works best with many vhost which only differs by docroot.
Example:
# put host in log file
LogFormat "%V %h %l %u %t \"%r\" %s %b" vcommon
CustomLog logs/access_log vcommon
# let apache decides the docroot based on fqdn
VirtualDocumentRoot /var/www/vhosts/%0/docs
VirtualScriptAlias /var/www/vhosts/%0/cgi-bin
Variables one can use
0 the whole name (www.domain.tld)
1 the first part (www)
2 the second part (domain)
-1 the last part (tld)
-2 the penultimate part
2+ the second and all subsequent parts
-2+ the penultimate and all preceding parts
1+ and -1+ the same as 0
Deletions:
CHeck out http://httpd.apache.org/docs/2.0/mod/mod_vhost_alias.html. One can setup something like evhost in lighttpd. Works best with many vhost which only differs by docroot.


Revision [1925]

Edited on 2008-09-05 09:52:03 by WikiAdmin
Additions:
CHeck out http://httpd.apache.org/docs/2.0/mod/mod_vhost_alias.html. One can setup something like evhost in lighttpd. Works best with many vhost which only differs by docroot.


Revision [1802]

Edited on 2008-07-08 02:00:33 by WikiAdmin
Additions:
""






Deletions:
""
ParameterExplaination
MaxClients Determines how large is each httpd process, then multiple by MaxClients. Should not exceed physical mem
MaxRequestsPerChild number of requests handled per child, do not set it to 0
KeepAlive [On|Off] Tells apache whether to close a connection immediately a request has been filled. If a page contains seberal js, several images, and several of others, turning on KeepAlive will save the time and resource to estabish tcp connections for each and one of those objects. But because connections are maintained for some period of time, apache's resource is not fully used for serving maximum number of clients. In long run, turning on KeepAlive means more MaxClients is required.
KeepAliveTimeout [15] Try set it to short period of time, thus benefit from KeepAlive while not overload server with inactive connections.
MaxKeepAliveRequests [100] - How many requests a client can make within one connection
worker MPM many child processes, each has many threads
BufferedLogs On Writes log to memory and write to disk in batch
ForensicLog filename Writes logs for forensic use








Revision [1801]

Edited on 2008-07-08 01:58:01 by WikiAdmin
Additions:
""
ParameterExplaination
MaxClients || Determines how large is each httpd process, then multiple by MaxClients. Should not exceed physical mem
MaxRequestsPerChild || number of requests handled per child, do not set it to 0
KeepAlive || On: KeepAlive allows multiple requests to be made over a single connection, thus reducing the time spent establishing socket connections.
KeepAliveTimeout || do not set it larger than 60
worker MPM || many child processes, each has many threads
BufferedLogs On || Writes log to memory and write to disk in batch
ForensicLog filename || Writes logs for forensic use







ParameterExplaination
MaxClients || Determines how large is each httpd process, then multiple by MaxClients. Should not exceed physical mem
MaxRequestsPerChild || number of requests handled per child, do not set it to 0
KeepAlive || On: KeepAlive allows multiple requests to be made over a single connection, thus reducing the time spent establishing socket connections.
KeepAliveTimeout || do not set it larger than 60
worker MPM || many child processes, each has many threads
BufferedLogs On || Writes log to memory and write to disk in batch
ForensicLog filename || Writes logs for forensic use
""
Deletions:
||~ Parameter ||~ Explaination||
|| MaxClients || Determines how large is each httpd process, then multiple by MaxClients. Should not exceed physical mem ||
|| MaxRequestsPerChild || number of requests handled per child, do not set it to 0 ||
|| KeepAlive || On: KeepAlive allows multiple requests to be made over a single connection, thus reducing the time spent establishing socket connections. ||
|| KeepAliveTimeout || do not set it larger than 60 ||
|| worker MPM || many child processes, each has many threads ||
|| BufferedLogs On || Writes log to memory and write to disk in batch ||
|| ForensicLog filename || Writes logs for forensic use ||


Revision [1799]

Edited on 2008-07-07 03:15:44 by WikiAdmin
Additions:
cat httpd-S | awk '{print $4}' | cut -d\. -f2-3 | sort


Revision [1798]

Edited on 2008-07-07 03:11:48 by WikiAdmin
Additions:
=== Dumping virtual host info to a file===
httpd -S 1>httpd-S 2>&1
enableLookups="false" debug="0" protocol="AJP/1.3" allowTrace="false" />
Deletions:
enableLookups="false" debug="0" protocol="AJP/1.3" allowTrace="false" />


Revision [1508]

The oldest known version of this page was created on 2008-03-18 19:13:13 by WikiAdmin
Valid XHTML 1.0 Transitional :: Valid CSS :: Powered by WikkaWiki