Welcome! Log In Create A New Profile

Advanced

Re: nginx бэкэнд для apache

May 25, 2011 03:32AM
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;
}

}

}
Subject Author Posted

nginx бэкэнд для apache

Efrem May 25, 2011 02:46AM

Re: nginx бэкэнд для apache

Igor Sysoev May 25, 2011 02:58AM

Re: nginx бэкэнд для apache

Efrem May 25, 2011 03:02AM

Re: nginx бэкэнд для apache

Igor Sysoev May 25, 2011 03:18AM

Re: nginx бэкэнд для apache

Efrem May 25, 2011 03:21AM

Re: nginx бэкэнд для apache

Efrem May 25, 2011 03:32AM

Re: nginx бэкэнд для apache

Efrem May 25, 2011 03:34AM

Re: nginx бэкэнд для apache

Efrem May 25, 2011 03:36AM

Re: nginx бэкэнд для apache

Efrem May 25, 2011 03:52AM

Re: nginx бэкэнд для apache

Igor Sysoev May 25, 2011 03:26AM

Re: nginx бэкэнд для apache

Igor Sysoev May 25, 2011 03:40AM

Re: nginx бэкэнд для apache

Oleksandr V. Typlyns'kyi May 25, 2011 03:58AM

Re: nginx бэкэнд для apache

Igor Sysoev May 25, 2011 03:58AM

Re: nginx бэкэнд для apache

Efrem May 25, 2011 04:23AM

Re: nginx бэкэнд для apache

Efrem May 25, 2011 08:00AM

Re: nginx бэкэнд для apache

Igor Sysoev May 25, 2011 08:50AM

Re: nginx бэкэнд для apache

Efrem May 25, 2011 09:03AM

Re: nginx бэкэнд для apache

Igor Sysoev May 25, 2011 09:10AM

Re: nginx бэкэнд для apache

Efrem May 25, 2011 09:24AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 168
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready