Apache: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 11: | Line 11: | ||
This would route all requests starting with a t to the site somewhere.com and present its contents to the user as if delivered by the front server. | This would route all requests starting with a t to the site somewhere.com and present its contents to the user as if delivered by the front server. | ||
==who is hammering my apache?== | |||
sudo perl -e '$ip{(split)[0]}++ while <>; print map "$_ : $ip{$_}\n", sort {$ip{$b} <=> $ip{$a}} keys %ip' /var/log/httpd/halfface.se.access.log | |||
[[Category:Applications]] | [[Category:Applications]] | ||
[[Category:Unix]] | [[Category:Unix]] | ||
[[Category:Web]] | [[Category:Web]] |
Revision as of 10:53, 8 September 2015
Documentation
http://httpd.apache.org/docs/2.3/mod/core.html
proxy
The idea is to receive all incoming requests on a single HTTP server. This server, using mod_proxy and mod_rewrite, will route requests to X backend servers, acting as a reverse proxy. This can be done very simply once mod_proxy is installed, by adding lines such as:
RewriteEngine on RewriteRule ^t(.*)$ http://somewhere.com/ [P,L]
This would route all requests starting with a t to the site somewhere.com and present its contents to the user as if delivered by the front server.
who is hammering my apache?
sudo perl -e '$ip{(split)[0]}++ while <>; print map "$_ : $ip{$_}\n", sort {$ip{$b} <=> $ip{$a}} keys %ip' /var/log/httpd/halfface.se.access.log