Требуется проигрывание видосов с сервера

S
На сайте с 29.03.2019
Offline
0
966

Требуется проигрывание видосов с сервера (Ubuntu 16 LTS), стоит связка nginx 1.10.3 и апач. Веб сервак настроенн, все работает ок.

Теперь пересобираю nginx с нужными мне модулями:

Nginx 1.10.3 собран со всеми стандартными модулями, плюс добавил модули: RTMP, Progress upload, FLV, MP4.

./configure --with-cc-opt='-g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2' --with-ld-opt='-Wl,-Bsymbolic-functions -fPIE -pie -Wl,-z,relro -Wl,-z,now' --prefix=/usr/share/nginx --conf-path=/etc/nginx/nginx.conf --http-log-path=/var/log/nginx/access.log --error-log-path=/var/log/nginx/error.log --lock-path=/var/lock/nginx.lock --pid-path=/run/nginx.pid --http-client-body-temp-path=/var/lib/nginx/body --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --http-proxy-temp-path=/var/lib/nginx/proxy --http-scgi-temp-path=/var/lib/nginx/scgi --http-uwsgi-temp-path=/var/lib/nginx/uwsgi --with-debug --with-pcre-jit --with-ipv6 --with-http_ssl_module --with-http_stub_status_module --with-http_realip_module --with-http_auth_request_module --with-http_addition_module --with-http_dav_module --with-http_geoip_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_image_filter_module --with-http_v2_module --with-http_sub_module --with-http_xslt_module --with-stream --with-stream_ssl_module --with-mail --with-mail_ssl_module --with-threads --with-http_mp4_module --with-http_flv_module --add-module=/home/odmin/nginx-rtmp-module-master --add-module=/home/odmin/nginx-upload-progress-module-master

В конфиге nginx.conf добавил:

rtmp {

server {
application vidbase {
play /var/www/;
}
}
}

Однако при старте выдает ошибку, ругается на вставленный в конфиг код: RTMP

root@VIDEOPNZ:~# service nginx start

Job for nginx.service failed because the control process exited with error code. See "systemctl status nginx.service" and "journalctl -xe" for details.

(Вот этот код)

root@VIDEOPNZ:~# systemctl status nginx.service journalctl

? nginx.service - A high performance web server and a reverse proxy server
Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Пт 2019-03-29 12:39:11 MSK; 58s ago
Process: 28335 ExecStop=/sbin/start-stop-daemon --quiet --stop --retry QUIT/5 --pidfile /run/nginx.pid (code=exited, status=0/SUCCESS)
Process: 28236 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
Process: 29430 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=1/FAILURE)
Main PID: 28238 (code=exited, status=0/SUCCESS)

мар 29 12:39:11 VIDEOPNZ systemd[1]: Starting A high performance web server and a reverse proxy server...
мар 29 12:39:11 VIDEOPNZ nginx[29430]: nginx: [emerg] unknown directive "rtmp" in /etc/nginx/nginx.conf:10
мар 29 12:39:11 VIDEOPNZ nginx[29430]: nginx: configuration file /etc/nginx/nginx.conf test failed
мар 29 12:39:11 VIDEOPNZ systemd[1]: nginx.service: Control process exited, code=exited status=1
мар 29 12:39:11 VIDEOPNZ systemd[1]: Failed to start A high performance web server and a reverse proxy server.
мар 29 12:39:11 VIDEOPNZ systemd[1]: nginx.service: Unit entered failed state.
мар 29 12:39:11 VIDEOPNZ systemd[1]: nginx.service: Failed with result 'exit-code'.

? journalctl.service
Loaded: not-found (Reason: No such file or directory)
Active: inactive (dead)

При этом сам nginx собрался (make, make install) без ошибок совершенно.

В чем может быть проблема?

Я уже сдаюсь, прошу помощи знающих людей.

D
На сайте с 28.06.2008
Offline
1101
#1

Ну так

nginx -t

покажет конкретную строку конфига где проблемы

Evas EvaSystems
На сайте с 31.05.2012
Offline
104
#2

Вы должны взять точно такую же версию и собрать её абсолютно с такими же опциями, как и та, что стояла у вас стандартно из пакетов.

Быть может вы сделали не так и банально install у вас произошел в другую директорию. А вообще начиная с 1.9.11 nginx поддерживает динамические модули --add-dynamic-module

Технология такая-же, но слегка удобнее. Компилируете отдельно nginx с указанием динамических модулей, а затем подключаете нужные модули (.so файл с именем модуля)

к своему стандартному nginx с помощью load_module (при этом вы не теряете возможность обновления стандартного nginx из пакетов в автоматическом режиме).

Системный администратор Linux. Настройка, сопровождение и оптимизация серверов. Отзывы - searchengines.guru/ru/forum/1017473
HM
На сайте с 14.01.2012
Offline
223
#3

А что, на лоре не помогли советы?

Авторизуйтесь или зарегистрируйтесь, чтобы оставить комментарий