18.11.2009, в 7:59, Sheh написал(а):
worker_processes 1;
pid logs/nginx.pid;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
server
{
listen 80;
server_name localhost;
sub_filter http://server-db/ http://87.241.*.*/;
sub_filter_once off;
sub_filter_types text/xml text/css text/_javascript_;
location /
{
proxy_pass http://192.168.2.2;
+ proxy_set_header Host $host;
+ proxy_set_header X-Real-IP $remote_addr;
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html
{
root html;
}
}