user nginx;
worker_processes 4;
timer_resolution 100ms;
error_log /var/log/nginx/error.log;
pid /var/run/nginx.pid;
events {
worker_connections 100000;
use epoll;
}
worker_rlimit_nofile 100000;
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log off;
keepalive_timeout 3600;
server_tokens off;
reset_timedout_connection on;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
upstream proxydomain {
server 78.47.166.55:80; #ip сервера, куда проксируем
}
proxy_buffer_size 128k;
proxy_buffers 4 256k;
proxy_busy_buffers_size 256k;
server {
listen 85.17.164.230:80; #ip нашего сервера, т.е. прокси
server_name proxydomain.com;
root /var/www/html;
access_log off;
location /{
proxy_pass
Для просмотра ссылки Войди или Зарегистрируйся
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_connect_timeout 300s;
proxy_send_timeout 600s;
proxy_read_timeout 600s;
send_timeout 600s;
proxy_set_header Host $host;
proxy_redirect off;
port_in_redirect off;
client_max_body_size 100M;
client_body_buffer_size 1m;
proxy_intercept_errors on;
proxy_buffering on;
proxy_buffer_size 128k;
proxy_buffers 256 16k;
proxy_busy_buffers_size 256k;
proxy_temp_file_write_size 256k;
proxy_max_temp_file_size 0;
}
}
}