tao
July 03, 2013 06:41AM
Забыл указать nginx

nginx version: nginx/1.4.1
built by gcc 4.4.7 20120313 (Red Hat 4.4.7-3) (GCC)
TLS SNI support enabled
configure arguments:
--prefix=/etc/nginx
--sbin-path=/usr/sbin/nginx
--conf-path=/etc/nginx/nginx.conf
--error-log-path=/var/log/nginx/error.log
--http-log-path=/var/log/nginx/access.log
--pid-path=/var/run/nginx.pid
--lock-path=/var/run/nginx.lock
--http-client-body-temp-path=/var/cache/nginx/client_temp
--http-proxy-temp-path=/var/cache/nginx/proxy_temp
--http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp
--http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp
--http-scgi-temp-path=/var/cache/nginx/scgi_temp
--user=nginx
--group=nginx
--with-http_ssl_module
--with-http_realip_module
--with-http_addition_module
--with-http_sub_module
--with-http_gunzip_module
--with-http_gzip_static_module
--with-http_secure_link_module
--with-http_stub_status_module
--with-mail
--with-mail_ssl_module
--with-file-aio
--with-ipv6
--with-cc-opt='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
--param=ssp-buffer-size=4 -m64 -mtune=generic'
--add-module=/home/builder/rpmbuild/SOURCES/ngx_devel_kit
--add-module=/home/builder/rpmbuild/SOURCES/redis2-nginx-module
--add-module=/home/builder/rpmbuild/SOURCES/set-misc-nginx-module
--add-module=/home/builder/rpmbuild/SOURCES/lua-nginx-module
--add-module=/home/builder/rpmbuild/SOURCES/echo-nginx-module
--add-module=/home/builder/rpmbuild/SOURCES/nginx-rtmp-module


tao Wrote:
-------------------------------------------------------
> в браузере-клиенте (chrome) прописан ip http proxy (nginx)
> на домене club по 3000 порту висит socket.io с поддержкой xhr-pooling
> и websockets и nginx для отдачи статики по 80 порту
> все хорошо и отлично кешируется c 80 порта, xhr-pooling тоже работает
> отлично
>
> Но как только переключаюсь на websockets , получаю в логи
> ==
> [ 03/Jul/2013:11:50:17 +0400 ] - "CONNECT club:3000 HTTP/1.1" "400"
> "rt:0.018" "urt:-" "cache: -"
>
>
>
> ==== CONFIG
> map $http_upgrade $connection_upgrade {
> default upgrade;
> '' close;
> }
>
> upstream club_80 { server club:80;}
> upstream club_3000 { server club:3000;}
>
> server {
>
> listen 8090;
> server_name _;
> access_log /var/log/nginx/proxy.8090.access.log common;
> error_log /var/log/nginx/proxy.8090.error.log;
>
> source_charset utf-8;
> charset utf-8;
>
> recursive_error_pages on;
>
> #upstream mapping
> set $xport 80;
> if ($http_host ~ ":(\d+)") { set $xport $1; }
> set $upstr "club_${xport}";
>
>
> error_page 417 = @cached;
> error_page 418 = @nocached;
>
> proxy_http_version 1.1;
> proxy_set_header Upgrade $http_upgrade;
> proxy_set_header Connection $connection_upgrade;
>
> proxy_buffering off;
>
> location / {
>
> return 417;
> }
> location /socket.io {
>
> return 418;
> }
>
> location ~ /(ru|en/)?index.html {
>
> return 418;
> }
>
> #for index/socket.io
> location @nocached {
> proxy_read_timeout 86400;
> proxy_cache off;
> proxy_pass http://$upstr;
> proxy_set_header Host $host;
> proxy_set_header X-Forwarded-For
> $proxy_add_x_forwarded_for;
> add_header Cache-Control
> "no-cache,no-store,must-revalidate";
> expires -1;
> }
>
> #for static
> location @cached {
>
> proxy_cache_methods GET;
> proxy_cache_valid 200 5d;
> proxy_cache clubcache;
> proxy_pass http://$upstr;
> proxy_set_header Host $host:$proxy_port;
> proxy_set_header X-Forwarded-For
> $proxy_add_x_forwarded_for;
>
> proxy_cache_bypass $cookie_nocache
> $arg_nocache$arg_comment;
> proxy_cache_bypass $http_pragma $http_authorization;
>
> proxy_ignore_headers X-Accel-Expires Expires Cache-Control
> Set-Cookie;
>
> add_header Cache-Control "no-cache,no-store,must-revalidate";
> expires -1;
>
> }
> }
> ================= END
Subject Author Posted

Возможно ли использовать nginx как туннель с кешированием статики и websockets

tao July 03, 2013 05:45AM

Re: Возможно ли использовать nginx как туннель с кешированием статики и websockets

tao July 03, 2013 06:41AM

Re: Возможно ли использовать nginx как туннель с кешированием статики и websockets

Maxim Dounin July 03, 2013 06:48AM

Re: Возможно ли использовать nginx как туннель с кешированием статики и websockets

tao July 03, 2013 08:05AM

Re: Возможно ли использовать nginx как туннель с кешированием статики и websockets

Maxim Dounin July 03, 2013 08:16AM

Re: Возможно ли использовать nginx как туннель с кешированием статики и websockets

tao July 03, 2013 08:20AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 269
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready