• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • 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.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

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