On Wed, Aug 12, 2015 at 11:37 AM, Akila Ravihansa Perera <raviha...@wso2.com > wrote:
> Hi Udara, > > Sticky sessions are only available in Nginx Plus (enterprise version). Or > else you need to compile Nginx with sticky session module [1] to get it > working. > You can achieve session affinity with NGINX community version using hash key or ip_hash[1]. [1] http://nginx.org/en/docs/http/ngx_http_upstream_module.html > [1] https://bitbucket.org/nginx-goodies/nginx-sticky-module-ng/overview > > Thanks. > > On Wed, Aug 12, 2015 at 10:45 AM, Udara Liyanage <ud...@wso2.com> wrote: > >> Hi, >> >> I got the following error message when following [1] for Nignx >> configuration. >> >> $ sudo service nginx status >> ● nginx.service - A high performance web server and a reverse proxy server >> Loaded: loaded (/lib/systemd/system/nginx.service; enabled) >> Active: active (running) (Result: exit-code) since Wed 2015-08-12 >> 10:12:56 IST; 25min ago >> Process: 29227 ExecReload=/usr/sbin/nginx -g daemon on; master_process >> on; -s reload (code=exited, status=1/FAILURE) >> Process: 28190 ExecStart=/usr/sbin/nginx -g daemon on; master_process >> on; (code=exited, status=0/SUCCESS) >> Process: 28187 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; >> master_process on; (code=exited, status=0/SUCCESS) >> Main PID: 28191 (nginx) >> CGroup: /system.slice/nginx.service >> ├─28191 nginx: master process /usr/sbin/nginx -g daemon on; >> master_process on; >> ├─28192 nginx: worker process >> ├─28193 nginx: worker process >> ├─28194 nginx: worker process >> └─28195 nginx: worker process >> >> Aug 12 10:37:45 udarapc *nginx[29227]: nginx: [emerg] unknown directive >> "sticky" in /etc/nginx/conf.d/is-wso2.conf:6* >> Aug 12 10:37:45 udarapc systemd[1]: nginx.service: control process >> exited, code=exited status=1 >> Aug 12 10:37:45 udarapc systemd[1]: Reload failed for A high performance >> web server and a reverse proxy server. >> >> Below is my Nginx configuration. >> *is-wso2.conf content* >> >> upstream ssl.wso2.as.com { >> server 127.0.0.1:9443; >> sticky learn create=$upstream_cookie_jsessionid >> lookup=$cookie_jsessionid >> zone=client_sessions:1m; >> } >> >> server { >> listen 443; >> server_name is.wso2.com; >> ssl on; >> ssl_certificate /etc/nginx/ssl/is.wso2.com.crt; >> ssl_certificate_key /etc/nginx/ssl/is.wso2.com.key; >> location / { >> proxy_set_header X-Forwarded-Host $host; >> proxy_set_header X-Forwarded-Server $host; >> proxy_set_header X-Forwarded-For >> $proxy_add_x_forwarded_for; >> proxy_set_header Host $http_host; >> proxy_read_timeout 5m; >> proxy_send_timeout 5m; >> proxy_pass https://ssl.wso2.is.com; >> >> proxy_http_version 1.1; >> proxy_set_header Upgrade $http_upgrade; >> proxy_set_header Connection "upgrade"; >> } >> } >> >> [1] https://docs.wso2.com/display/CLUSTER420/Configuring+NGINX+Plus >> -- >> >> Udara Liyanage >> Software Engineer >> WSO2, Inc.: http://wso2.com >> lean. enterprise. middleware >> >> web: http://udaraliyanage.wordpress.com >> phone: +94 71 443 6897 >> >> _______________________________________________ >> Dev mailing list >> Dev@wso2.org >> http://wso2.org/cgi-bin/mailman/listinfo/dev >> >> > > > -- > Akila Ravihansa Perera > WSO2 Inc.; http://wso2.com/ > > Blog: http://ravihansa3000.blogspot.com > > _______________________________________________ > Dev mailing list > Dev@wso2.org > http://wso2.org/cgi-bin/mailman/listinfo/dev > > -- Deependra Ariyadewa WSO2, Inc. http://wso2.com/ http://wso2.org email d...@wso2.com; cell +94 71 403 5996 ; Blog http://risenfall.wordpress.com/ PGP info: KeyID: 'DC627E6F' *WSO2 - Lean . Enterprise . Middleware*
_______________________________________________ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev