# Custom blocks for aapanel streaming endpoints
location ~* ^/(stream-(seg|ts|vid)|poster|seg|ts|vid)/ {
    gzip off;  # disable gzip for video
    include fastcgi.conf;
    include pathinfo.conf;
    fastcgi_pass unix:/tmp/php-cgi-83.sock;
    fastcgi_index index.php;
    fastcgi_param SCRIPT_FILENAME $document_root/index.php;
    fastcgi_param SCRIPT_NAME /index.php;
    # Disable Nginx buffering so that data is immediately forwarded to the client
    fastcgi_buffering off;
    fastcgi_keep_conn on;          # keep the connection alive
    fastcgi_read_timeout 600s;     # large enough for transfer besar
    # Specify SSL parameters if required (same as default)
    fastcgi_param SSL_PROTOCOL $ssl_protocol;
    fastcgi_param SSL_CIPHER $ssl_cipher;
}
