Web Hosting Talk







View Full Version : mod_trottle httpd.conf


searley
09-22-2001, 04:46 PM
I have istalled mod_throttle on a raq4 and it works perfectly! :-)

my question relates to the httpd.conf..

i currently manually edit the file and add:
ThrottlePolicy Volume 1G 30d

is the a way to have this automatically added??

brandonk
09-22-2001, 05:37 PM
Good question... hopefully someone can enlighten us.

nexzt
09-22-2001, 09:05 PM
Simple!

locate Vsite.pm
cd into that folder
cp Vsite.pm Vsite.pm.bak
pico Vsite.pm

*hit ctrl + w* and type DocumentRoot and you should see..

<VirtualHost $addr>
ServerName $name
ServerAdmin $serveradmin
DocumentRoot $Htgroup_dir/$group/$Webdir
RewriteEngine on
RewriteCond %{HTTP_HOST} !^$addr(:80)?$my
RewriteCond %{HTTP_HOST} !^$name(:80)?$my
RewriteRule ^/(.*) http://$name/\$1 [L,R]
RewriteOptions inherit
AliasMatch ^/~([^/]+)(/(.*))? $Htgroup_dir/$group/users/\$1/web/\$3
</VirtualHost>
EOF

Somewhere after the RewriteOptionsInherit and between the AliasMatch would be a good place to stick what ever you wanted to put in there.. this would re-write the sites settings with that limit of bandwidth or what ever else you wanted to place in there.

<EDIT>

thesmallguyshost
09-23-2001, 11:35 AM
Originally posted by nexzt
Simple!

<EDIT>

And this wouldn't affect when you delete a virtual site? It will still remove all the info from httpd.conf?

nexzt
09-23-2001, 09:59 PM
if you remove the virtual site it should remove its entire <VirtualHost> </VirutalHost> setting.

brandonk
09-23-2001, 11:11 PM
Originally posted by nexzt
if you remove the virtual site it should remove its entire <VirtualHost> </VirutalHost> setting.

Hey Thanks!

seattlite
09-24-2001, 06:30 AM
great post nextzt. This should make things a lot easier.

nexzt
09-24-2001, 10:16 AM
Thats just one of the many little tricks that i know of :) anything else just let me know