• 06-04-2021, 01:54:12
    #1
    Merhaba,
    ubuntu serverda http_secure_link_module yüklü olmasına ragmen nginx config dosyasındaki secure_link'i tanımıyor ve nginx i başlatmaya çalıştığımda onun oldugu satırda hata veriyor. bunu nasıl düzeltirim
    nginx: [emerg] unknown directive "secure_link"
  • 06-04-2021, 02:21:14
    #2
    nginx: /usr/sbin/nginx /usr/lib/nginx /etc/nginx /usr/local/nginx /usr/share/nginx /usr/share/man/man8/nginx.8.gz
    whereis nginx yazınca bunu yazdı

    benim nginx i başlatmak için yazdıgım komut: /usr/local/nginx/sbin/nginx -g 'daemon off;'
    düzenleme yaptığım nginx.conf dosyası ise /usr/local/nginx/conf/nginx.conf

    yardımınız için çok teşekkür ederim
  • 06-04-2021, 04:02:30
    #3
    conf düzenledikten sonra yaptım yine aynısı oldu hocam
    nginx: [emerg] unknown directive "secure_link" in /usr/local/nginx/conf/nginx.conf:39
  • 06-04-2021, 15:02:08
    #4
    Merhaba,

    SSH üzerinden nginx -V yazıp çıktıyı atar mısınız?

    Ayrıca /usr/local/nginx/conf/nginx.conf paylaşabilir misiniz?
  • 06-04-2021, 15:04:15
    #5
    Nginx sürümünüz ile alakalı bir durum, ücretli sürümde kullanılması için son yapılan bir değişiklik hataya sebep oluyor 1.14.x serisine kurmayı deneyin.
  • 06-04-2021, 15:33:31
    #6
    mselim adlı üyeden alıntı: mesajı görüntüle
    Merhaba,

    SSH üzerinden nginx -V yazıp çıktıyı atar mısınız?

    Ayrıca /usr/local/nginx/conf/nginx.conf paylaşabilir misiniz?
    Merhaba, teşekkür ederim
    configure arguments: --with-cc-opt='-g -O2 -fdebug-prefix-map=/build/nginx-5J5hor/nginx-1.18.0=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -Wdate-time -D_FORTIFY_SOURCE=2' --with-ld-opt='-Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -fPIC' --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 --modules-path=/usr/lib/nginx/modules --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-compat --with-pcre-jit --with-http_ssl_module --with-http_stub_status_module --with-http_realip_module --with-http_auth_request_module --with-http_v2_module --with-http_dav_module --with-http_slice_module --with-threads --with-http_addition_module --with-http_flv_module --with-http_geoip_module=dynamic --with-http_gunzip_module --with-http_gzip_static_module --with-http_image_filter_module=dynamic --with-http_mp4_module --with-http_perl_module=dynamic --with-http_random_index_module --with-http_secure_link_module --with-http_sub_module --with-http_xslt_module=dynamic --with-mail=dynamic --with-mail_ssl_module --with-stream=dynamic --with-stream_ssl_module --with-stream_ssl_preread_module --add-dynamic-module=/build/nginx-5J5hor/nginx-1.18.0/debian/modules/http-headers-more-filter --add-dynamic-module=/build/nginx-5J5hor/nginx-1.18.0/debian/modules/http-auth-pam --add-dynamic-module=/build/nginx-5J5hor/nginx-1.18.0/debian/modules/http-cache-purge --add-dynamic-module=/build/nginx-5J5hor/nginx-1.18.0/debian/modules/http-dav-ext --add-dynamic-module=/build/nginx-5J5hor/nginx-1.18.0/debian/modules/http-ndk --add-dynamic-module=/build/nginx-5J5hor/nginx-1.18.0/debian/modules/http-echo --add-dynamic-module=/build/nginx-5J5hor/nginx-1.18.0/debian/modules/http-fancyindex --add-dynamic-module=/build/nginx-5J5hor/nginx-1.18.0/debian/modules/nchan --add-dynamic-module=/build/nginx-5J5hor/nginx-1.18.0/debian/modules/http-lua --add-dynamic-module=/build/nginx-5J5hor/nginx-1.18.0/debian/modules/rtmp --add-dynamic-module=/build/nginx-5J5hor/nginx-1.18.0/debian/modules/http-uploadprogress --add-dynamic-module=/build/nginx-5J5hor/nginx-1.18.0/debian/modules/http-upstream-fair --add-dynamic-module=/build/nginx-5J5hor/nginx-1.18.0/debian/modules/http-subs-filter --add-dynamic-module=/build/nginx-5J5hor/nginx-1.18.0/debian/modules/http-geoip2


    conf dosyası

    worker_processes auto;
    events {
    worker_connections 1024;
    }

    # RTMP configuration
    rtmp {
    server {
    listen 1935; # Listen on standard RTMP port
    chunk_size 4000;

    application show {
    live on;
    # Turn on HLS
    hls on;
    hls_path /nginx/hls/;
    hls_fragment 3;
    hls_playlist_length 60;
    # disable consuming the stream from nginx as rtmp
    deny play all;
    }
    }
    }

    http {
    sendfile off;
    tcp_nopush on;
    #aio on;
    directio 512;
    default_type application/octet-stream;

    server {
    listen 8080;

    location ~ .(ts|m3u8)$ {
    sub_filter .ts .ts$is_args$args;
    sub_filter_once off;
    sub_filter_types application/vnd.apple.mpegurl;
    secure_link $arg_tkn,$arg_tms;
    secure_link_md5 <b><font color="red">kamak</font></b>$arg_tms;

    if ($secure_link = "") {
    return 404;
    }

    if ($secure_link = "0") {
    return 404;
    }
    }
    location / {
    # Disable cache
    add_header 'Cache-Control' 'no-cache';

    # CORS setup
    add_header 'Access-Control-Allow-Origin' '*' always;
    add_header 'Access-Control-Expose-Headers' 'Content-Length';

    # allow CORS preflight requests
    if ($request_method = 'OPTIONS') {
    add_header 'Access-Control-Allow-Origin' '*';
    add_header 'Access-Control-Max-Age' 1728000;
    add_header 'Content-Type' 'text/plain charset=UTF-8';
    add_header 'Content-Length' 0;
    return 204;
    }

    types {
    application/dash+xml mpd;
    application/vnd.apple.mpegurl m3u8;
    video/mp2t ts;
    }

    root /nginx/;
    }
    }
    }
  • 06-04-2021, 15:52:28
    #7
    Merhaba,

    secure_link_md5 <b><font color="red">kamak</font></b>$arg_tms; satırını

    secure_link_md5 "$arg_tms kamak"; olarak değiştirip nginx restart yaparak deneyebilir misiniz? Eğer olmaz ise secure_link_md5 "$secure_link_tms kamak"; yaparak deneyin birde.

    Ek olarak isterseniz root bilgilerini pm olarak gönderin kontrol edelim
  • 06-04-2021, 17:34:43
    #8
    mselim hocam sunucudaki sorunu çözdü nginx kurulumunda hata varmış