    #################################
    # Common rules                  #
    #################################
    location /dashboard {
        {rules_access_dashboard}
        deny all;
        rewrite ^/dashboard/(.*)$ /$1 break;
        proxy_pass http://openviduserver/;
    }

    location /inspector {
        {rules_access_dashboard}
        deny all;
        proxy_pass http://openviduserver;
    }

    location /kibana {
        {rules_access_dashboard}
        deny all;

        rewrite ^/kibana/(.*)$ /$1 break;
        proxy_pass http://kibana/;
    }

    location ~ ^/openvidu/elasticsearch$ {
        {rules_access_dashboard}
        deny all;
        
        rewrite ^/openvidu/elasticsearch$ / break;
        proxy_pass http://elasticsearch;
    }


    location ~ ^/openvidu/elasticsearch/.*$ {
        {rules_access_dashboard}
        deny all;

        rewrite ^/openvidu/elasticsearch(.*)$ $1 break;
        proxy_pass http://elasticsearch;
    }

    location ~ /openvidu$ {
        proxy_pass http://openviduserver;
    }