- It seems you are looking in the wrong place. If you have installed XtreamUI, the config file is
/home/xtreamcodes/iptv_xtream_codes/nginx/conf/nginx.conf
and not in/etc/nginx.conf
- You Need to add the rewrite after the other rewrites in this section of the config file: