ðòïåëôù 


  áòèé÷ 


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 ÂÜËÜÎÄ ÄÌÑ apache



user  www;
worker_processes  1;

timer_resolution 100ms;

worker_rlimit_nofile 2048;

#worker_priority -5;

pid        /var/run/nginx.pid;


events {
    worker_connections  1024;
    use kqueue;
}


http {
    include       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"';

    sendfile on;
    tcp_nopush on;

    keepalive_timeout  0;
    
    reset_timedout_connection on;
    
    server_tokens off;
    
    #gzip on;
    #gzip_min_length 1100;
    #gzip_buffers 64 8k;
    #gzip_comp_level 3;
    #gzip_http_version 1.1;
    #gzip_proxied any;
    #gzip_types text/plain application/xml application/x-javascript
text/css;
    
    index  index.php index.html index.htm;

    server {
        listen       80 default accept_filter=httpready;
        server_name  test.net.test-domen.ru;
        
        root /usr/local/www/nginx;

        charset windows-1251;
        
        client_max_body_size 1m;
        
        access_log  /var/log/nginx/test.access.log main;
        error_log   /var/log/nginx/test.error.log warn;

        location = /stat {
            stub_status on;
            access_log  off;
            allow 10.81.6.0/24;
            deny all;
        }
        location ~* .+\.php($|/.+)$ {
            include fastcgi_params;
            fastcgi_split_path_info ^(.+\.php)(/.+)$;
            fastcgi_pass unix:/tmp/php-fpm.sock;
            fastcgi_index index.php;
            fastcgi_param SCRIPT_FILENAME
/usr/local/www/nginx$fastcgi_script_name;
            fastcgi_param PATH_INFO $fastcgi_path_info;
        }
        
        location ~ ^/(status|ping)$ {        
            fastcgi_pass unix:/tmp/php-fpm.sock;
            fastcgi_param SCRIPT_FILENAME $fastcgi_script_name;
            include fastcgi_params;
            access_log off;
            allow 10.81.6.0/24;
            deny all;
        }

        #error_page  404              /404.html;

        # redirect server error pages to the static page /50x.html
        #
        #error_page   500 502 503 504  /50x.html;
        #location = /50x.html {
        #    root   /usr/local/www/nginx-dist;
        #}
    }


    # HTTPS server
    #
    server {
        listen       443;
        server_name  test.net.test-domen.ru;
        
        root /usr/local/www/nginx;
        
        charset windows-1251;
        
        client_max_body_size 64m;                                       
                                                                        
            
        
        access_log  /var/log/nginx/ssl-test.access.log main;            
                                                                        
               
        error_log   /var/log/nginx/ssl-test.error.log warn;
        
        ssl                  on;
        ssl_certificate      ssl/test.net.test-domen.ru.crt;
        ssl_certificate_key  ssl/test.net.test-domen.ru.key;
        ssl_client_certificate  ssl/testCA.crt;

        ssl_session_timeout  5m;

        ssl_protocols  SSLv3 TLSv1;
        ssl_ciphers 
ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;
        ssl_prefer_server_ciphers   on;
        
        ssl_verify_client optional;
        
        ssl_session_cache shared:SSL:10m;
        
        location ~* .+\.php($|/)$ {                                            
                                                                        
    
                    include fastcgi_params;                                    
                                                                        
            
                    fastcgi_split_path_info ^(.+\.php)(/.+)$;
                    fastcgi_pass unix:/tmp/php-fpm.sock;
                    fastcgi_index index.php;                                   
                                                                        
            
                    fastcgi_param SCRIPT_FILENAME
/usr/local/www/nginx$fastcgi_script_name;                               
                                          
                    fastcgi_param HTTPS on;
                    fastcgi_param SSL_CIPHER $ssl_cipher;
                    fastcgi_param SSL_CLIENT_M_SERIAL $ssl_client_serial;
                    fastcgi_param SSL_CLIENT_S_DN $ssl_client_s_dn;
                    fastcgi_param SSL_CLIENT_I_DN $ssl_client_i_dn;
                    fastcgi_param PATH_INFO $fastcgi_path_info;
                    fastcgi_param HTTP_RPROXY_SERVER_NAME 
$HTTP_RPROXY_SERVER_NAME;
                    fastcgi_param HTTP_RPROXY_SSL_SERVER_DN
$HTTP_RPROXY_SSL_SERVER_DN;
                    fastcgi_param HTTP_RPROXY_SSL_SERVER_DN_CN
$HTTP_RPROXY_SSL_SERVER_DN_CN;
                    fastcgi_param HTTP_RPROXY_SSL_SERVER_M_SERIAL
$HTTP_RPROXY_SSL_SERVER_M_SERIAL;
                    fastcgi_param HTTP_RPROXY_SSL_CIPHER 
$HTTP_RPROXY_SSL_CIPHER;
                    fastcgi_param HTTP_RPROXY_SSL_CLIENT_VERIFY
$HTTP_RPROXY_SSL_CLIENT_VERIFY;
                    fastcgi_param HTTP_RPROXY_SSL_PROTOCOL 
$HTTP_RPROXY_SSL_PROTOCOL;
                    fastcgi_param HTTP_RPROXY_SSL_CLIENT_S_DN
$HTTP_RPROXY_SSL_CLIENT_S_DN;
                    fastcgi_param HTTP_RPROXY_SSL_CLIENT_I_DN
$HTTP_RPROXY_SSL_CLIENT_I_DN;
                    fastcgi_param HTTP_RPROXY_SSL_CLIENT_M_SERIAL
$HTTP_RPROXY_SSL_CLIENT_M_SERIAL;
        }
        
    }

}

Posted at Nginx Forum: 
http://forum.nginx.org/read.php?21,200623,200634#msg-200634


_______________________________________________
nginx-ru mailing list
nginx-ru@xxxxxxxxx
http://nginx.org/mailman/listinfo/nginx-ru


 




Copyright © Lexa Software, 1996-2009.