Apache-Talk @lexa.ru 

Inet-Admins @info.east.ru 

Filmscanners @halftone.co.uk 

Security-alerts @yandex-team.ru 

nginx-ru @sysoev.ru 


   


   


   















      :: nginx-ru
Nginx-ru mailing list archive (nginx-ru@sysoev.ru)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: - nginx



umask :
  nginx'    `ip a'.



29.01.08, 12:23, "Yaroslav" <yarik@xxxxxxxxxxxxxxxxx>:



  
,      
    

  
-  nginx,    .  nginx   
    

  
.    :
    

  
bind() to 192.168.0.2:80 failed (99: Cannot assign requested address)
    

  
    .
    

  
PS.
    

  
 echo 1 > /proc/sys/net/ipv4/tcp_tw_recycle  
    

  
: Fedora 7
    


  
nginx':

user apache apache;
worker_processes1;
worker_rlimit_nofile 40000;

error_log/var/log/nginx/error.log;

pid/var/run/nginx/nginx.pid;

events {
worker_connections25000;
}

http {
include /usr/local/nginx/etc/mime.types;
default_typeapplication/octet-stream;

log_formatmain'$remote_addr - $remote_user [$time_local] $status '
'"$request" $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
#log_format main '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent"';


access_log/var/log/nginx/access.logmain;

limit_zone one$binary_remote_addr10m;
limit_conn one7;
limit_rate 512K;

client_header_timeout 60;
client_body_timeout 60;
send_timeout120;
proxy_read_timeout60;
proxy_connect_timeout 60;
proxy_send_timeout180;

msie_paddingon;

proxy_buffer_size 32K;
proxy_buffers 64 512K;
proxy_busy_buffers_size 1024K;
proxy_temp_file_write_size1024K;

gzip on;
gzip_min_length10240;
gzip_buffers 32 64k;
gzip_types text/html application/x-_javascript_ text/css text/xml text/plain;

client_header_buffer_size 4K;
client_max_body_size100000000;
large_client_header_buffers 16 8K;

sendfileon;
tcp_nopushon;
tcp_nodelay on;

output_buffers 32 256k;
postpone_output1460;

lingering_time 30;
lingering_timeout6;
reset_timedout_connectionon;

keepalive_timeout20;

server_names_hash_bucket_size 64;
server {
listen 192.168.0.1:80 default rcvbuf=8192 sndbuf=16384 backlog=32000;
server_name server.domain.com;
access_log/var/log/httpd/access_logmain;
error_log /var/log/httpd/domains/access_log info;
error_log /var/log/httpd/domains/error_log notice;
location / {
proxy_pass http://192.168.0.1:8080/;
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;
}

#Static files location
location ~* ^.+\.(jpg|jpeg|gif|mp3|png|avi|vob|mpg|mpeg|mp4|ico|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|wav|bmp|rtf|js)$ {
root /var/www/html;
}
}
server {
listen 192.168.0.2:80;
server_namedomain2.com www.domain2.com;
access_log /var/log/httpd/domains/domain2.com.logmain;
error_log/var/log/httpd/domains/domain2.com.error.log info;
error_log/var/log/httpd/domains/domain2.com.error.log notice;
location / {
proxy_pass http://192.168.0.2:8080/;
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;
}

#Static files location
location ~* ^.+\.(jpg|jpeg|gif|mp3|html|png|avi|vob|mpg|mpeg|mp4|ico|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|wav|bmp|rtf|js)$ {
root /home/domain2.com/public_html;
}
}
}
ip a

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 00:e0:81:5b:17:7e brd ff:ff:ff:ff:ff:ff
inet 192.168.0.1/23 brd 195.189.227.255 scope global eth0
inet 192.168.0.2/23 brd 195.189.227.255 scope global secondary eth0:1
inet6 fe80::2e0:81ff:fe5b:177e/64 scope link
valid_lft forever preferred_lft forever
3: eth1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 00:e0:81:5b:17:7f brd ff:ff:ff:ff:ff:ff
inet 10.11.11.20/24 brd 10.11.11.255 scope global eth1


 




Copyright © Lexa Software, 1996-2009.