Revision [3661]
Last edited on 2010-03-10 18:47:05 by KenFongAdditions:
==[[ApacheBW mod_bw]]==
Revision [3562]
Edited on 2009-10-29 08:37:05 by WikiAdminAdditions:
==[[ApacheAuth Authentication]]==
Deletions:
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
AllowOverride AuthConfig
Then, create an .htaccess file in the appropriate directory, or put this under the
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 WikiAdminAdditions:
SetEnvIf Request_URI "^/robots\.txt$" allow_this
Allow from env=allow_this
Allow from env=allow_this
Revision [3537]
Edited on 2009-10-06 19:18:01 by WikiAdminAdditions:
===Apache Web Server===
Deletions:
What does these do?
AcceptFilter http none
AcceptFilter https none
Revision [2367]
Edited on 2009-07-08 07:33:23 by WikiAdminAdditions:
==[[ApacheQOS mod_qos]]==
Revision [2156]
Edited on 2009-01-18 19:25:44 by WikiAdminAdditions:
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
require valid-user
#require group admins
Allow from 127.0.0.1
Satisfy Any
Deletions:
require valid-user
#require group admins
Revision [2106]
Edited on 2008-12-08 01:24:55 by WikiAdminAdditions:
RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
From Apache 1.3.34, 2.0.55 and later, one can put this into httpd.conf:
TraceEnable Off
From Apache 1.3.34, 2.0.55 and later, one can put this into httpd.conf:
TraceEnable Off
Deletions:
Revision [2057]
Edited on 2008-10-27 00:17:01 by WikiAdminAdditions:
==[[ApacheCoreDumps Core Dumps]]==
Revision [1973]
Edited on 2008-09-26 06:25:29 by WikiAdminAdditions:
==[[ApacheCache mod_cache]]==
Revision [1971]
Edited on 2008-09-26 05:56:13 by WikiAdminAdditions:
==[[ApacheTuning Tuning Apache]]==
Deletions:
Revision [1968]
Edited on 2008-09-26 05:55:11 by WikiAdminAdditions:
==[[ApacheTuning Tunning Apache]]==
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|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 WikiAdminAdditions:
===Go figure===
What does these do?
AcceptFilter http none
AcceptFilter https none
What does these do?
AcceptFilter http none
AcceptFilter https none
Revision [1928]
Edited on 2008-09-05 10:04:58 by WikiAdminAdditions:
====Traditional vhosts====
Revision [1927]
Edited on 2008-09-05 10:04:27 by WikiAdminAdditions:
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
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:
Revision [1925]
Edited on 2008-09-05 09:52:03 by WikiAdminAdditions:
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 WikiAdminAdditions:
""
| 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|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 |
| 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 |
| 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 |
Deletions:
|| 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 WikiAdminAdditions:
cat httpd-S | awk '{print $4}' | cut -d\. -f2-3 | sort
Revision [1798]
Edited on 2008-07-07 03:11:48 by WikiAdminAdditions:
=== Dumping virtual host info to a file===
httpd -S 1>httpd-S 2>&1
enableLookups="false" debug="0" protocol="AJP/1.3" allowTrace="false" />
httpd -S 1>httpd-S 2>&1
enableLookups="false" debug="0" protocol="AJP/1.3" allowTrace="false" />