Nginx-ru mailing list archive (nginx-ru@sysoev.ru)
[Date Prev ][Date Next ][Thread Prev ][Thread Next ][Date Index ][Thread Index ]
Проблема frontend-backend
У меня проблема с проксированием... сделал как в примере на sysoev.ru
Вот, поглядите, что получается:
http://www.2baksa.net:81/ Это через nginx
http://www.2baksa.net/ Без него
Выглядит по разному.... что-то не так в проксировании...
Конфиг предлагаю. Не пойму, что не так сделал..
Заранее спасибо за помощь!
Леоненко Дмитрий
user apache;
worker_processes 1;
error_log /var/log/nginx/error.log;
pid /var/run/nginx.pid;
events {
worker_connections 2048;
use kqueue;
}
http {
include conf/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] '
'"$request" $status $bytes_sent '
'"$http_referer" "$http_user_agent" '
'"$gzip_ratio"';
log_format download '$remote_addr - $remote_user [$time_local] '
'"$request" $status $bytes_sent '
'"$http_referer" "$http_user_agent" '
'"$http_range" "$sent_http_content_range"';
sendfile on;
tcp_nopush on;
tcp_nodelay on;
client_header_timeout 3m;
client_body_timeout 3m;
send_timeout 3m;
client_header_buffer_size 1k;
large_client_header_buffers 4 4k;
gzip on;
gzip_min_length 1100;
gzip_buffers 4 8k;
gzip_types text/plain;
output_buffers 1 32k;
postpone_output 1460;
send_lowat 12000;
keepalive_timeout 75 20;
server {
listen nowa.ru:81;
server_name nowa.ru www.nowa.ru;
access_log /var/log/nginx.access_log main;
charset cp-1251;
location / {
proxy_pass http://www.nowa.ru/ ;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
#proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
client_max_body_size 10m;
client_body_buffer_size 128k;
client_body_temp_path /tmp/nginx/client_body_temp;
proxy_connect_timeout 90;
proxy_send_timeout 90;
proxy_read_timeout 90;
proxy_send_lowat 12000;
proxy_buffer_size 4k;
proxy_buffers 4 32k;
proxy_busy_buffers_size 64k;
proxy_temp_file_write_size 64k;
proxy_temp_path /tmp/nginx/proxy_temp;
}
location ~ /\.ht {
deny all;
}
location ~*
^.+\.(jpg|jpeg|gif|png|tiff|html|htm|zip|rar|exe|iso|tar|gz|bz2|msi|pdf|doc|txt|rtf)$
{
root /home/nowaru/domains/nowa.ru/public_html;
# access_log off;
expires 30d;
}
}
server {
listen 2baksa.net:81;
server_name 2baksa.net www.2baksa.net;
access_log /var/log/nginx.access_log main;
charset cp-1251;
location / {
proxy_pass http://www.2baksa.net/ ;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
#proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
client_max_body_size 10m;
client_body_buffer_size 128k;
client_body_temp_path /tmp/nginx/client_body_temp;
proxy_connect_timeout 90;
proxy_send_timeout 90;
proxy_read_timeout 90;
proxy_send_lowat 12000;
proxy_buffer_size 4k;
proxy_buffers 4 32k;
proxy_busy_buffers_size 64k;
proxy_temp_file_write_size 64k;
proxy_temp_path /tmp/nginx/proxy_temp;
}
location ~ /\.ht {
deny all;
}
location ~*
^.+\.(jpg|jpeg|gif|png|tiff|html|htm|zip|rar|exe|iso|tar|gz|bz2|msi|pdf|doc|txt|rtf)$
{
root /home/nowaru/domains/2baksa.net/public_html;
access_log off;
expires 30d;
}
}
}