Welcome! Log In Create A New Profile

Advanced

Re: problem with argument route in upstream

RODRIGUEZ Daniel
November 18, 2014 04:40PM
Tanks for your reply
It means there is only the ip_hash solution on the free version?

Envoyé de mon iPhone

> Le 18 nov. 2014 à 22:32, Homutov Vladimir <vl@nginx.com> a écrit :
>
>> On 19.11.2014 00:25, RODRIGUEZ Daniel wrote:
>> Hi,
>>
>> I was looking for hours what is the problem with my conf.
>>
>> I am trying to implement a nginx reverse loadbalancer with tomcat
>> application servers.
>>
>> I chose the route method here is the conf :
>>
>> map $cookie_jsessionid $route_cookie {
>>
>> ~.+\.(?P<route>\w+)$ $route;
>>
>> }
>>
>> map $request_uri $route_uri {
>>
>> ~jsessionid=.+\.(?P<route>\w+)$ $route;
>>
>> }
>>
>> upstream antares {
>>
>> server xxxxx:8000 route=server1;
>>
>> server yyyy:8000 route=server2;
>>
>> sticky route $route_cookie $route_uri;
>>
>> }
>>
>> server {
>>
>> listen XXXXX:51001;
>>
>> access_log /var/log/nginx/c2375.log main;
>>
>> location / {
>>
>> proxy_buffers 8 4k;
>>
>> proxy_busy_buffers_size 16k;
>>
>> proxy_set_header Host $host;
>>
>> proxy_set_header X-Real-IP $remote_addr;
>>
>> proxy_pass http://antares;
>>
>> }
>>
>> }
>>
>> With this I get on the error.log :
>>
>> 2014/11/18 19:56:40 [emerg] 9520#0: invalid parameter "route=server1" in
>> /etc/nginx/conf.d/c2375.conf:13
>>
>> I an using ngninx on rhel 6 with the rpm compile on ngin.org :
>>
>> nginx version: nginx/1.6.2
>>
>> 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_dav_module --with-http_flv_module --with-http_mp4_module
>> --with-http_gunzip_module --with-http_gzip_static_module
>> --with-http_random_index_module --with-http_secure_link_module
>> --with-http_stub_status_module --with-http_auth_request_module
>> --with-mail --with-mail_ssl_module --with-file-aio --with-ipv6
>> --with-http_spdy_module --with-cc-opt='-O2 -g -pipe
>> -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
>> --param=ssp-buffer-size=4 -m64 -mtune=generic'
>>
>> Any idea ?
>
> The sticky directive is only available in nginx-plus [1]
>
> [1] http://nginx.com/products/
>
>>
>> *Rodriguez Daniel*
>> *Administrateur Infrastructures Clientes**
>> *Groupe SOFTWAY MEDICAL
>> Tel: 04 42 97 66 36
>> Gsm : 06 59 75 17 58
>>
>> www.softwaymedical.fr http://www.softwaymedical.fr
>>
>>
>>
>> _______________________________________________
>> nginx mailing list
>> nginx@nginx.org
>> http://mailman.nginx.org/mailman/listinfo/nginx
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

problem with argument route in upstream

RODRIGUEZ Daniel November 18, 2014 04:28PM

Re: problem with argument route in upstream

Homutov Vladimir November 18, 2014 04:34PM

Re: problem with argument route in upstream

RODRIGUEZ Daniel November 18, 2014 04:40PM

Re: problem with argument route in upstream

mex November 19, 2014 03:44AM

Re: problem with argument route in upstream

RODRIGUEZ Daniel November 19, 2014 08:18AM

Re: problem with argument route in upstream

Francis Daly November 18, 2014 04:36PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 309
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