• Introducing WebPros Cloud - a fully managed infrastructure platform purpose-built to simplify the deployment of WebPros products !  WebPros Cloud enables you to easily deliver WebPros solutions — without the complexity of managing the infrastructure.
    Join the pilot program today!
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.

Issue Error at save - unknown directive "secure_link" nginx module

Andr39

New Pleskian
I try to save via Plesk some nginx rules for a module (ngx_http_secure_link_module) and i receive an error. The rules work on an a test server without Plesk.

Plesk v. 12.5.30
Plesk > files.example.com > Apache & Nginx settings

I try to save this in textarea:
Code:
location /downloads/ {
	valid_referers none blocked server_names
	               *.example.com example.com;

	if ($invalid_referer) {
	    return 403;
	}

    secure_link $arg_st,$arg_e;
    secure_link_md5 "secret$uri$arg_e$remote_addr";

    root /var/www/vhosts/example.com/files.example.com;
    if ($secure_link = "") {
            return 403;
    }
    if ($secure_link = 0) {
            return 410;
    }

}

The error in red is
Code:
Invalid nginx configuration: nginx: [emerg] unknown directive "secure_link" in 
/var/www/vhosts/system/files.example.com/conf/vhost_nginx.conf:9 nginx: 
configuration file /etc/nginx/nginx.conf test failed
 
It sems the module is not enabled
Code:
nginx -V
nginx version: nginx/1.11.1
built with OpenSSL 1.0.1e-fips 11 Feb 2013
TLS SNI support enabled
configure arguments: 
--prefix=/usr/share 
--sbin-path=/usr/sbin/nginx 
--conf-path                       =/etc/nginx/nginx.conf 
--modules-path=/usr/share/nginx/modules 
--error-log-path=                       /var/log/nginx/error.log
--http-log-path=/var/log/nginx/access.log 
--lock-path=/                       var/lock/nginx.lock 
--pid-path=/var/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 
--user=nginx --group=nginx 
--with-ipv6 --wi                       th-file-aio 
--with-http_v2_module 
--with-http_ssl_module 
--with-http_realip_modu                       le 
--with-http_sub_module 
--with-http_dav_module 
--with-http_gzip_static_module                        
--with-http_stub_status_module 
--add-dynamic-module=/usr/share/passenger/ngx_htt                       p_passenger_module

Do you know which is the easiest way to enable it? Thanks
http://nginx.org/en/docs/http/ngx_http_secure_link_module.html
 
Back
Top