1、首先nginx 安装有http_sub_module模块
2 在nginx 配置如下
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
sendfile on;
#tcp_nopush on;
keepalive_timeout 65;
#start置灰代码快
sub_filter '</head>' '<style type="text/css">html {filter: grayscale(90%); }</style></head>';
sub_filter_once on;
#end置灰代码快
gzip on;
gzip_comp_level 1;
gzip_types text/plain application/x-javascript text/css application/xml text/javascript image/jpeg image/gif image/png;
gzip_vary off;
gzip_disable "MSIE [1-6]\.";
include /etc/nginx/conf.d/*.conf;
}
Iphone手机拨号
*3001#12345# * 拨号