server {
    listen %%interface%%:8099 default_server;

    include /etc/nginx/includes/server_params.conf;
    include /etc/nginx/includes/proxy_params.conf;

    #sub_filter_types text/html;

    location / {
        allow   172.30.32.2;
        deny    all;
        sub_filter "/ws" "%%ingress_entry%%/ws";
        sub_filter "/login/ws" "%%ingress_entry%%/login/ws";
        sub_filter "/settings/ws" "%%ingress_entry%%/settings/ws";
        sub_filter "/logs/ws" "%%ingress_entry%%/logs/ws";
        sub_filter "/critical/ws" "%%ingress_entry%%/critical/ws";
        sub_filter "/awtrixer/ws" "%%ingress_entry%%/awtrixer/ws";
        sub_filter "/about/ws" "%%ingress_entry%%/about/ws";
        sub_filter "/map/ws"  "%%ingress_entry%%/map/ws";
        sub_filter "/matrixstats/ws" "%%ingress_entry%%/matrixstats/ws";
        sub_filter "/myapps/ws" "%%ingress_entry%%/myapps/ws";
        sub_filter "/stats/ws" "%%ingress_entry%%/stats/ws";
        sub_filter "/premium/ws" "%%ingress_entry%%/premium/ws";
        sub_filter "/matrixlog/ws" "%%ingress_entry%%/matrixlog/ws";
        sub_filter "/arcade/ws" "%%ingress_entry%%/arcade/ws";
        sub_filter "/icons/ws" "%%ingress_entry%%/icons/ws";
        sub_filter "/audio/ws"  "%%ingress_entry%%/audio/ws";
        sub_filter "/applist/ws" "%%ingress_entry%%/applist/ws";
        sub_filter "/appstore/ws" "%%ingress_entry%%/appstore/ws";
        sub_filter "/weather/ws" "%%ingress_entry%%/weather/ws";
        sub_filter "/pages" "%%ingress_entry%%/pages";
        #sub_filter "../../plugins" "../plugins"; 
        proxy_pass http://backend;
    }
}