On 29-12-2010 20:00, Michelle Konzack wrote:
Hello *, On my gateway I use a bunch of files (currently 1782) like ----8<------------------------------------------------------ <VirtualHost 88.168.69.36:80> ServerName $HOST_NAME ProxyRequests off ProxyVia on ProxyPass / http://$HOST_IP/ ProxyPassReverse / http://$HOST_IP/ ProxyPreserveHost on <Proxy *> Order deny,allow Allow from all </Proxy> </VirtualHost> ----8<------------------------------------------------------ and it works perfectly, but i disike the memory consumation of apache2.2 so, my question is: How can I do this better?
With mod_rewrite and rewritemap. It should look something like this (untested):
urlmap.txt [textfile] host1 ip1 host2 ip2 host3 ip3 . . . httpd.conf: RewriteEngine On RewriteMap urlmap txt:/path/to/urlmap.txt # Only rewrite if there is a host header RewriteCond %{HTTP_HOST} !^$ # Lowercase the hostheader RewriteCond ${lowercase:%{HTTP_HOST}} ^(.+)$ # Rewrite only if there is an entry in the urlmap RewriteCond ${urlmap:%1} ^([0-9].*)$ RewriteRule /(.*) http://%1/$1 [P,L] Joost --------------------------------------------------------------------- The official User-To-User support forum of the Apache HTTP Server Project. See <URL:http://httpd.apache.org/userslist.html> for more info. To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx " from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx