-
Notifications
You must be signed in to change notification settings - Fork 1k
Nginx RTMP Hooks and HTTPS Redirect Issue
Daniel Neto edited this page Apr 4, 2026
·
1 revision
-
The
on_publish,on_play,on_doneand similar hooks from nginx-rtmp-module use only HTTP -
They do not support HTTPS
-
If your server redirects HTTP → HTTPS:
- All
on_*hooks will fail - AVideo will not receive the events correctly
- All
- ❌ Using
https://inon_*URLs - ❌ Automatic HTTP → HTTPS redirect
- ❌ Any proxy/CDN forcing HTTPS
- ❌ Domain that does not respond directly on HTTP
- The hook must be called like:
http://your-server/plugin/Live/on_publish.php
- And must return:
HTTP 200 OK
- No redirect allowed
If this happens:
http://your-server/plugin/Live/on_publish.php
→ 301 redirect → https://your-server/...
Then:
- nginx-rtmp cannot follow properly
- Hook fails
- Live streaming logic breaks
- If Nginx RTMP and AVideo are on the same server:
use http://127.0.0.1
Example:
on_publish http://127.0.0.1/plugin/Live/on_publish.php;
on_play http://127.0.0.1/plugin/Live/on_play.php;
on_done http://127.0.0.1/plugin/Live/on_done.php;
-
This avoids:
- redirects
- SSL issues
- DNS problems
-
The
on_*URLs:- MUST be HTTP
- MUST NOT redirect
If any redirect or HTTPS is involved:
- ❌ It will not work
- ❌ There is no workaround inside nginx-rtmp
-
nginx-rtmp hooks require direct HTTP access
-
HTTPS or redirects will break the integration
-
The safest approach is:
- use
127.0.0.1when possible - ensure zero redirects on these endpoints
- use
The Open Source Video Platform Solution
| Service | Description | Link |
|---|---|---|
| 🎯 | Professional Support - Direct assistance from core developers | Contact |
| ☁️ | AVideo CDN - High-performance video delivery network | Pricing |
AVideo Platform © 2024 - Self-hosted video streaming platform
Made with ❤️ by WWBN and the open source community