Original address: 80063031
Recently built a local nginx server based on rtmp, did not expect the first step cloning error: Homebrew/nginx was deprecated. This tap was now the empty as all its formulae were migrated. Specific as follows:
The first step is to use:
Add Nginx clone to local $ brew tap Homebrew/nginx
The error is as follows:
The reason for this is that Homebrew/nginx's git path has changed (seemingly March 2018 update)
The lookup gets the clone to local command changed to be resolved and changed to:
brew tap denji/homebrew-nginx
The clone succeeds and then executes the second step:
Installing Nginx
$ Brew Install Nginx-full--with-rtmp-module
The results are as follows:
Follow the prompts to perform:
brew unlink nginx
Execution succeeds, the total above steps are:
- Clone to local brew tap Homebrew/nginx
- Unlink Brew unlink Nginx
- Install Brew Install Nginx-full--with-rtmp-module
- Start Nginx
Path to the configuration file (/usr/local/etc/nginx/nginx.conf)
1> configuration Nginx, support HTTP protocol pull stream
- Location/hls {
- #Serve HLS Config
- Types {
- Application/vnd.apple.mpegurl m3u8;
- VIDEO/MP2T ts;
- }
- root/usr/local/var/www;
- Add_header Cache-control No-cache;
- }
2> configuration Nginx, support RTMP protocol push stream
- rtmp {
- server {
- Listen 1935;
- Application Rtmplive {
- Live on;
- Max_connections 1024;
- }
- Application hls{
- Live on;
- HLS on;
- Hls_path/usr/local/var/www/hls;
- Hls_fragment 1s;
- }
- }
- }
3> restart
nginx -s reload
Push Flow Test
- Push stream to Rtmp to server
- Push stream to HLS to server
(turn) Mac build local Nginx server based on rtmp error Homebrew/nginx was deprecated. This tap was now the empty as all its form