大旗谷资源网 Design By www.zqyou.com
nginx服务器
nginx是非常出色web服务器,对于静态文件的处理非常高效,同时它的代理转发功能和其它后台服务器搭配起来也非常的简单高效。
location
我们知道nginx会对请求进行解析,然后回得到关于请求的url等信息,我们只需要对url进行匹配,然后拦截即可。
匹配规则
location / { if ($request_uri ~* ^/\"color: #ff0000">防盗链返回http代码,例如设置nginx防盗链:
location ~* \.(gif|jpg|png|swf|flv)$ { valid_referers none blocked www.80shihua.com www.menghuiguli.com; if ($invalid_referer) { return 404; } }nginx常用变量
nginx解析出很多我们常用的变量,我们只需要拿过来使用即可,下面就是nginx常用的变量。具体使用方法,可以参考官方文档。
$content_length
$content_type
$cookie_
$date_gmt
$date_local
$document_root
$document_uri
$fastcgi_path_info
$fastcgi_script_name
$gzip_ratio
$host
$hostname (ngx_http_core_module)
$hostname (ngx_stream_core_module)
$http2
$http_
$protocol
$proxy_host
$proxy_port
$query_string
$realpath_root
$request
$request_body
$request_uri
$scheme
$server_name
$uri
总结
大旗谷资源网 Design By www.zqyou.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
大旗谷资源网 Design By www.zqyou.com
暂无如何利用nginx通过正则拦截指定url请求详解的评论...
更新日志
2024年10月18日
2024年10月18日
- 群星《歌手2024 第4期》[FLAC/分轨][563.76MB]
- RiffKitten-ChaosParade(2024)[24-44,1]FLAC
- RuneKlakegg-Nattevandrer(2024)[24-96]\FLAC
- 赖冰霞.2006-金嗓典藏辑2IN1(南方金点系列)2CD【南方】【WAV+CUE】
- 群星.1988-国语金曲尽精英VOL.2【瑞成】【WAV+CUE】
- 张宇.1999-雨一直下【EMI百代】【WAV+CUE】
- 袁娅维.2021-月亮失眠了(DELUXE)【华纳】【FLAC分轨】
- AlanBroadbent-JazzFunk(2024)[24-44,1]
- 梅艳芳《绝代芳华》开盘母带[低速原抓WAV+CUE]
- ABC唱片-《外国精逊母带直刻神奇黑胶[APE+CUE].
- 群星《天赐的声音第五季 第6期》[320K/MP3][101.43MB]
- 群星《天赐的声音第五季 第6期》[FLAC/分轨][526.16MB]
- 群星《说唱梦工厂 第2期》[320K/MP3][96.37MB]
- 杨宗宪.1994-留你留袂着【有容唱片】【WAV+CUE】
- 李翊君.2005-勇敢的爱【创意唱片】【WAV+CUE】