pedstersplanet
09-08-2004, 12:13 PM
re: Monthly Bandwidth limit on Win 2k, Apache 2.0.48 (Edit:) on multiple virtual hosts?
Can this be done? Most forums say that it can only be done on *UNIX systems, and Apache 1.3x?!?!? Is this true?!?!
I understand that mod.curb is used for this rather than mod.throttle or mod.bandwidth?
TIA
mikmik
09-14-2004, 01:59 AM
Here is a good link : http://www.steve.org.uk/Software/mod_curb/
Also, mod.throttle : http://www.onlamp.com/pub/a/bsd/2001/07/26/Big_Scary_Daemons.html
Looks like you don't have to compile anything.
Are you trying to limit total bandwidth per month?
I don't see why you can't load mod.throttle in the http.conf?
Just put it here, and then configure mod.throttle, no?
# Dynamic Shared Object (DSO) Support
#
# To be able to use the functionality of a module which was built as a DSO you
# have to place corresponding `LoadModule' lines at this location so the
# directives contained in it are actually available _before_ they are used.
# Statically compiled modules (those listed by `httpd -l') do not need
# to be loaded here.
#
# Example:
# LoadModule foo_module modules/mod_foo.so
#
LoadModule access_module modules/mod_access.so
LoadModule actions_module modules/mod_actions.so
LoadModule alias_module modules/mod_alias.so
LoadModule asis_module modules/mod_asis.so
LoadModule auth_module modules/mod_auth.so
#LoadModule auth_anon_module modules/mod_auth_anon.so
#LoadModule auth_dbm_module modules/mod_auth_dbm.so
#LoadModule auth_digest_module modules/mod_auth_digest.so
LoadModule autoindex_module modules/mod_autoindex.so
mikmik
09-14-2004, 02:11 AM
All those are for 1.3.x (above) but this looks very interesting
Configuring Apache for Windows (http://www.linuxforum.com/apache/windows.html)
Apache is configured by files in the conf directory. These are the same as files used to configure the Unix version, but there are a few different directives for Apache on Windows. See the Apache documentation for all the available directives.
Begin configuring the Apache server by reviewing httpd.conf and its directives. Although the files access.conf and srm.conf both exist, these are old files which are no longer used by most administrators, and you will find no directives there.
httpd.conf contains a great deal of documentation itself, followed by the default configuration directives recommended when starting with the Apache server. Begin by reading these comments to understand the configuration file, and make small changes, starting Apache in a console window with each change. If you make a mistake, it will be easier to back up to configuration that last worked. You will have a better idea of which change caused the server to fail.
The main differences in Apache for Windows are:
* Because Apache for Windows is multithreaded, it does not use a separate process for each request, as Apache does with Unix. Instead there are usually only two Apache processes running: a parent process, and a child which handles the requests. Within the child each request is handled by a separate thread. So, "process"-management directives are different:
o MaxRequestsPerChild - Like the Unix directive, this controls how many requests a process will serve before exiting. However, unlike Unix, a process serves all the requests at once, not just one, so if this is set, it is recommended that a very high number is used. The recommended default, MaxRequestsPerChild 0, does not cause the process to ever exit.
o ThreadsPerChild - This directive is new, and tells the server how many threads it should use. This is the maximum number of connections the server can handle at once; be sure and set this number high enough for your site if you get a lot of hits. The recommended default is ThreadsPerChild 50.
* The directives that accept filenames as arguments now must use Windows filenames instead of Unix ones. However, because Apache uses Unix-style names internally, you must use forward slashes, not backslashes. Drive letters can be used; if omitted, the drive with the Apache executable will be assumed.
* Apache for Windows has the ability to load modules at runtime, without recompiling the server. If Apache is compiled normally, it will install a number of optional modules in the modules directory. To activate these, or other modules, the new LoadModule directive must be used. For example, to activate the status module, use the following (in addition to the status-activating directives in httpd.conf - see the mod_status docs for more details.):
LoadModule status_module modules/mod_status.so
Information on creating loadable modules is also available. Note that some 3rd party modules may be distributed in the old style names, ApacheModuleFoo.dll. Always set the LoadModule command as directed by the 3rd party module's own documentation.
* Apache for Windows version 1.3 series is implemented in synchronous calls. This poses an enormous problem for CGI authors, who won't see unbuffered results sent immediately to the browser. This is not the behavior described for CGI in Apache, but it is a side-effect of the Windows port. Apache 2.0 is making progress to implement the expected asynchronous behavior, and we hope to discover that the NT/2000 implementation allows CGI's to behave as documented.
*
Apache can also load ISAPI Extensions (i.e., Internet Server Applications), such as those used by Microsoft's IIS, and other Windows servers. More information is available. Note that Apache CANNOT load ISAPI Filters.
* When running CGI scripts, the method Apache uses to find the interpreter for the script is configurable using the ScriptInterpreterSource directive.
* Since it is often difficult to manage files with names like .htaccess under windows, you may find it useful to change the name of this configuration file using the AccessFilename directive
On windows, apache just loads the modules, it works different than on *nix, so maybe those other mods can be used...not sure. But that mod.status looks interesting.
mikmik
09-14-2004, 02:17 AM
This!
http://www.php-editors.com/apache_manual/mod/mod_status.html
pedstersplanet
09-14-2004, 05:10 PM
Here is a good link : http://www.steve.org.uk/Software/mod_curb/
Also, mod.throttle : http://www.onlamp.com/pub/a/bsd/2001/07/26/Big_Scary_Daemons.html
Looks like you don't have to compile anything.
Are you trying to limit total bandwidth per month?
I'm hosting a few small sites on my home server, as well as some of my bits, so I would like to set an amount, say 6gb a month for each site - as it gets rinsed lol.
I had bad news on Sunday, my server PC packed up (burnt out), I wasn't happy...... I just hope the HDD is still in tact lol, as my server is heavey - mail server, apache/php/perl/mssql/mysql, and a chat server....lol...
I have ordered another (faster) PC on Sunday, so wish me luck...... lol
But I'll bookmark this thread for reference, thanks mikmik.