Welcome! Log In Create A New Profile

Advanced

Re: nginx + Google Analytics

ast
February 17, 2011 02:44PM
Если вы посмотрите, и что нибудь подскажете, я буду благодарен, т.к. с нджинксом только недавно начал работать.

nginx.conf

[code]
user www-data;
worker_processes 8;

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

events {
worker_connections 10024;
# multi_accept on;
}

http {
include /etc/nginx/mime.types;

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

sendfile on;

include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;

[/code]
}

и site.com

[code]
log_format dlog '$remote_addr [$time_local] "$request" $status $body_bytes_sent '
'upstream_response_time $upstream_response_time '
'msec $msec request_time $request_time-->$upstream_addr';
#---$http_user_agent';
error_page 403 404 /usr/local/nginx/html/404.html;
proxy_buffer_size 8k;
proxy_buffers 48 8k;
proxy_busy_buffers_size 192k;
proxy_temp_file_write_size 128k;

upstream backend_80 {
ip_hash;

server d1:8081 max_fails=3 fail_timeout=30s;
server d2:8081 max_fails=3 fail_timeout=30s;
server d3:8081 max_fails=3 fail_timeout=30s;
server d4:8081 max_fails=3 fail_timeout=30s;
}
upstream backend_443 {
ip_hash;

server d1:8081 max_fails=3 fail_timeout=30s;
server d2:8081 max_fails=3 fail_timeout=30s;
server d3:8081 max_fails=3 fail_timeout=30s;
server d4:8081 max_fails=3 fail_timeout=30s;
}

server {
server_name d.site.com;
access_log /var/log/nginx/d-access.log dlog;

gzip on;
gzip_min_length 200;
gzip_types text/plain text/xml text/css application/x-javascript application/rss+xml;
gzip_proxied any;
gzip_disable "msie6";
gzip_comp_level 3;
gzip_vary on;
gzip_http_version 1.0;
keepalive_timeout 60;
location /login/validate { return 444; access_log off;}
location /server-status { return 444; access_log off;}

location = /stats {
ustats on;
#ustats_html_table_width 50;
#ustats_html_table_height 50;
access_log off;
auth_basic "Restricted";
auth_basic_user_file /etc/nginx/htpass;
}
location / {
proxy_pass http://backend_80;
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;

}
}

server {
listen 443;
server_name d.site.com;

gzip on;
gzip_min_length 200;
gzip_types text/plain text/xml text/css application/x-javascript application/rss+xml;
gzip_proxied any;
gzip_disable "msie6";
gzip_comp_level 3;
gzip_vary on;
gzip_http_version 1.0;
keepalive_timeout 60;
ssl on;
access_log /var/log/nginx/d-access.log dlog;
ssl_certificate /etc/nginx/conf.d/ssl/crt/public.crt;
ssl_certificate_key /etc/nginx/conf.d/ssl/private/d.site.com.key_nopasshphrase.org;

ssl_ciphers HIGH:MEDIUM;
location / {
proxy_pass http://backend_443;
}
}

server {
listen localhost:8080;
server_name nginx_status.localhost;
location /server-status {
stub_status on;
access_log off;
allow 127.0.0.1;
deny all;
}
}

[/code]
Subject Author Posted

nginx + Google Analytics

Anton Koshevoy February 13, 2011 09:24AM

Re: nginx + Google Analytics

tantra February 13, 2011 01:20PM

Re: nginx + Google Analytics

ast February 17, 2011 09:19AM

Re: nginx + Google Analytics

Max Ivanov February 17, 2011 10:42AM

Re: nginx + Google Analytics

ast February 17, 2011 11:02AM

Re: nginx + Google Analytics

ast February 17, 2011 09:44AM

Re: nginx + Google Analytics

tantra February 17, 2011 01:38PM

Re: nginx + Google Analytics

ast February 17, 2011 02:44PM

Падение сервера при зажатии кнопки F5

Александр Рочев February 17, 2011 04:18PM

Re: Падение сервера при зажатии кнопки F5

Алексей Малов February 18, 2011 03:46AM

Re: Падение сервера при зажатии кнопки F5

Slava Kokorin February 18, 2011 03:56AM

RE: Падение сервера при зажатии кнопки F5

Савельев Александр February 18, 2011 05:50AM

Re: Падение сервера при зажатии кнопки F5

Olexander Shtepa February 18, 2011 07:12AM

RE: Падение сервера при зажатии кнопки F5

Савельев Александр February 18, 2011 07:22AM

Re: nginx + Google Analytics

ast February 18, 2011 04:07AM

Re: nginx + Google Analytics

Dmitry Morozovsky February 18, 2011 04:50AM

Re: nginx + Google Analytics

Igor Sysoev February 18, 2011 05:18AM

Re: nginx + Google Analytics

Dmitry Morozovsky February 18, 2011 05:14PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 70
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready