在数字的海洋
如沉稳舵手启航
代码编织梦想
创新之思闪耀光芒
日夜守在屏幕旁
字符跳跃
指尖流芳
为系统稳定奔忙
让灵感之花绽放

王爷府游记,又名:王府游记

网址:www.wangyefu.cn

简介:
该站收录:北京(恭王府、雍和宫、平西王府、廉亲王府、怡亲王府、那王府、郑亲王府、醇亲王府)

内蒙古(喀喇沁王府、奈曼郡王府、四子王旗王府、鄂尔多斯伊金霍洛旗郡王府、巴林左旗多罗郡王府… …)

江苏、浙江、河南、西藏、宁夏、四川、广西… …

国内众多王府(王爷府)介绍,人物传记,王府游记等

http部分增加以下内容:

1
2
3
4
5
6
fastcgi_cache_path  /home/cache/path levels=1:2 keys_zone=WORDPRESS:128m inactive=1d max_size=10g;
fastcgi_temp_path /home/cache/temp;
fastcgi_cache_key "$scheme$request_method$host$request_uri";
fastcgi_cache_use_stale error timeout invalid_header http_500;

fastcgi_ignore_headers Cache-Control Expires Set-Cookie;

server部分增加以下内容(wordpress适用):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
set $skip_cache 0;
#post访问不缓存
if ($request_method = POST) {
set $skip_cache 1;
}
#动态查询不缓存
if ($query_string != "") {
set $skip_cache 1;
}
#后台等特定页面不缓存(其他需求请自行添加即可)
if ($request_uri ~* "/wp-admin/|/xmlrpc.php|wp-.*.php|/feed/|index.php|sitemap(_index)?.xml") {
set $skip_cache 1;
}
#对登录用户、评论过的用户不展示缓存
if ($http_cookie ~* "comment_author|wordpress_[a-f0-9]+|wp-postpass|wordpress_no_cache|wordpress_logged_in") {
set $skip_cache 1;
}


location下增加以下内容

1
2
3
4
5
6
7
8
9
10
fastcgi_cache_bypass $skip_cache;
fastcgi_no_cache $skip_cache;
add_header X-Cache "$upstream_cache_status From $host";
add_header Nginx-Cache "$upstream_cache_status";
add_header Last-Modified $date_gmt;
add_header X-Frame-Options SAMEORIGIN;
add_header X-Content-Type-Options nosniff;
add_header X-XSS-Protection "1; mode=block";
fastcgi_cache WORDPRESS;
fastcgi_cache_valid 200 301 302 1d;

完整代码

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
fastcgi_cache_path  /home/cache/path levels=1:2 keys_zone=WORDPRESS:128m inactive=1d max_size=10g;
fastcgi_temp_path /home/cache/temp;
fastcgi_cache_key "$scheme$request_method$host$request_uri";
fastcgi_cache_use_stale error timeout invalid_header http_500;

fastcgi_ignore_headers Cache-Control Expires Set-Cookie;

server {
listen 80;
listen 443 ssl http2;
…………………此部省略……………………

set $skip_cache 0;
#post访问不缓存
if ($request_method = POST) {
set $skip_cache 1;
}
#动态查询不缓存
if ($query_string != "") {
set $skip_cache 1;
}
#后台等特定页面不缓存(其他需求请自行添加即可)
if ($request_uri ~* "/wp-admin/|/xmlrpc.php|wp-.*.php|/feed/|index.php|sitemap(_index)?.xml") {
set $skip_cache 1;
}
#对登录用户、评论过的用户不展示缓存
if ($http_cookie ~* "comment_author|wordpress_[a-f0-9]+|wp-postpass|wordpress_no_cache|wordpress_logged_in") {
set $skip_cache 1;
}

location ~ [^/]\.php(/|$) {
#fastcgi_pass remote_php_ip:9000;
fastcgi_pass unix:/dev/shm/php-cgi.sock;
fastcgi_index index.php;
include fastcgi.conf;
add_header Strict-Transport-Security "max-age=63072000; includeSubdomains; preload";
#新增的缓存规则
fastcgi_cache_bypass $skip_cache;
fastcgi_no_cache $skip_cache;
add_header X-Cache "$upstream_cache_status From $host";
add_header Nginx-Cache "$upstream_cache_status";
add_header Last-Modified $date_gmt;
add_header X-Frame-Options SAMEORIGIN;
add_header X-Content-Type-Options nosniff;
add_header X-XSS-Protection "1; mode=block";
fastcgi_cache WORDPRESS;
fastcgi_cache_valid 200 301 302 1d;
}

#缓存清理配置(可选)
location ~ /purge( /.*) { #为防止转义,请去掉{ /之间的空格
allow 127.0.0.1;
allow xxx.xxx.xxx.xxx;
deny all;

fastcgi_cache_purge WORDPRESS "$scheme$request_method$host$1";
}

文章来源:https://zhuanlan.zhihu.com/p/168688875

友情提示

低配服务器,静态页面;请勿攻击,请勿挂马

Low end servers, static pages; Do not attack, do not hang Trojan horses —from 百度翻译

Problem

The maximum job count has been reached for the storage unit.

Error Message

9/13/2011 3:12:19 AM - Info nbjm(pid=3972) requesting STANDARD_RESOURCE resources from RB for backup job (jobid=7442, request id:{AC15471C-F54E-4656-8DB3-20F6CEDCA1E0})
9/13/2011 3:12:19 AM - requesting resource nbmedia01-hcart3-robot-tld-0
9/13/2011 3:12:19 AM - requesting resource nbmedia01.NBU_CLIENT.MAXJOBS.nbclient01
9/13/2011 3:12:19 AM - requesting resource nbmedia01.NBU_POLICY.MAXJOBS.ExchangeDAG-Full
9/13/2011 3:12:19 AM - awaiting resource nbmedia01-hcart3-robot-tld-0 - No drives are available
9/13/2011 6:59:35 AM - awaiting resource nbmedia01-hcart3-robot-tld-0 Reason:
Drives are in use, Media Server: nbmedia01,
Robot Number: 0, Robot Type: TLD, Media ID: N/A, Drive Name: N/A,
Volume Pool: Exchange-VP, Storage Unit: nbmedia01-hcart3-robot-tld-0, Drive Scan Host: N/A
9/13/2011 6:59:35 AM - awaiting resource nbmedia01-hcart3-robot-tld-0 - No drives are available
9/13/2011 7:03:12 AM - awaiting resource

Cause

Potential hung allocation in the NetBackup resource broker (nbrb).

Solution

If it is known that the media is not physically in use, perform the following nbrbutil commands.

Note: The nbrbutil command resides in the following directories:
Windows: install_path\NetBackup\bin\admincmd
UNIX: /usr/openv/netbackup/bin/admincmd

    1. Run the following command and redirect it to a text file:
1
nbrbutil -dump

Example: Within this “dump” output, look for the following section…

MDS allocations in EMM:

MdsAllocation allocationKey=29 jobType=1 mediaKey=4000001 mediaId=A00001 driveKey=2000001 driveName=Single_DDS drivePath={3,0,6,0} stuName=Magg masterServerName=1time mediaServerName=1time ndmpTapeServerName=

    1. Within this section, find the media ID. In this example, A00001 is the media ID that can not be expired (bolded in the above output).

Note: the allocationKey (bolded above) for the media ID in question

    1. Run the following command, noting the MDS allocation key of the media. In this example, it would be “29”, for the allocationKey.
1
nbrbutil -releaseMDS <id>

资料来源:https://www.veritas.com/support/en_US/article.100006603

0%