Nginx Series Tutorials: HTTP Secure link Module

Source: Internet
Author: User
Keywords Http nginx secure series tutorials link module
Tags compiling configuration configuration instance default file higher html http

This module calculates and examines the required secure link URLs for the requirements. This module is not enabled by default, and to enable it, use the directive

--with-http_secure_link_module

Participate in compiling and installing Nginx. Note: This module is supported only if the Nginx version is 0.7.18 or higher.

Configuration instance:

location/p/{location ~ ^/p/(? <secure>[\w\-=]+,\d+) (? <file>/.+) $ {secure_link $secure; SECURE_LINK_MD5 $ Secure_link_expires $file.  PASSWORD;  if ($secure _link = "") {return 403;}  if ($secure _link = = 0) {return 410;} Alias/path/to$file;  return 404; Error_page 403/forbidden.html; Error_page 404/not_found.html; Error_page 410 =403/link_expired.html; }

Variable

$secure _link

Variable $secure _link has the following values:

""-Incorrect link "0"-Expired link "1"-Correct link

$secure _link_expires

Variable $secure _link_expires time value.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.