• Debian 11 is approaching its end-of-life (vendor EOL date - August 31, 2026). Plesk Obsidian 18.0.80 will be the last release to support it.
    If you are running Plesk Obsidian on Debian 11, we recommend you upgrade those servers to Debian 12 using our dist-upgrade tool.
  • We plan to deprecate and remove the support for XML RPC protocol versions earlier than 1.6.9.1 in Plesk Obsidian 18.0.82. We strongly recommend that you update all existing integrations using earlier versions of the XML RPC protocol to comply with the version 1.6.9.1 specification.

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