split traffic

ender ulusoy enderulusoy at gmail.com
Wed May 22 12:47:05 UTC 2019


Thanks but I got an error. I can not find the required module.

root at Net:~# nginx -t
nginx: [emerg] unknown directive "split_clients" in /etc/nginx/nginx.conf:598
nginx: configuration file /etc/nginx/nginx.conf test failed


nginx version: nginx/1.14.1
built by gcc 7.3.0 (Ubuntu 7.3.0-27ubuntu1~18.04) 
built with LibreSSL 2.7.4
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 --user=nginx --group=nginx --with-cc-opt=-Wno-deprecated-declarations --without-http_ssi_module --without-http_scgi_module --without-http_uwsgi_module --without-http_geo_module --without-http_split_clients_module --without-http_memcached_module --without-http_empty_gif_module --without-http_browser_module --with-threads --with-file-aio --with-http_ssl_module --with-http_v2_module --with-http_mp4_module --with-http_auth_request_module --with-http_slice_module --with-http_stub_status_module --with-http_realip_module --with-openssl=/usr/local/src/nginx/modules/libressl-2.7.4 --add-module=/usr/local/src/nginx/modules/incubator-pagespeed-ngx-1.13.35.2-stable --add-module=/usr/local/src/nginx/modules/ngx_brotli --add-module=/usr/local/src/nginx/modules/headers-more-nginx-module-0.33 --with-http_geoip_module --add-module=/usr/local/src/nginx/modules/ngx_cache_purge

I think the right module is ngx_http_tnt_module.so but I can not find how to install this module.

Any other chance without split module?





> On 22 May 2019, at 15:31, Reinis Rozitis <r at roze.lv> wrote:
> 
>> How can I achive this, any ideas? Thank you.
>> 
>> 
>> map $remote_addr $is_web_internal  {
>>       202.212.93.190  1;
>>      default  0;
>> }
>> 
>> if ($is_web_internal) {
>> return 301 https://new.domain.com.tr$uri ;
>> }
> 
> 
> Basically the same - you can just replace the map directive to split_clients 
> 
> split_clients $remote_addr $is_web_internal  {
>  10% 1;
>  *   0;  
> }
> 
> if ($is_web_internal) {
> return 301 https://new.domain.com.tr$uri ;
> }
> 
> 
> Then roughly ~10% of the clients will get the redirect.
> 
> rr
> 
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20190522/732b506c/attachment.html>


More information about the nginx mailing list