程序代码
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
include proxy.conf;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
server {
listen 80;
server_name localhost;
location / {
root html;
index index.html index.htm;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
proxy_cache_path /nginx/temp/existo levels=1:2 keys_zone=EXISTO:10m inactive=5m max_size=2m;
proxy_cache_path /nginx/temp/blog levels=1:2 keys_zone=BLOG:10m inactive=5m max_size=2m;
proxy_cache_path /nginx/temp/yafan levels=1:2 keys_zone=YAFAN:10m inactive=5m max_size=2m;
proxy_cache_path /nginx/temp/safe levels=1:2 keys_zone=SAFE:10m inactive=5m max_size=2m;
proxy_cache_path /nginx/temp/atimg levels=1:2 keys_zone=ATIMG:100m inactive=5m max_size=2m;
proxy_cache_path /nginx/temp/zhuatu levels=1:2 keys_zone=ZHUATU:10m inactive=5m max_size=2m;
server { listen 80; server_name existo.cn www.existo.cn;
location / {
proxy_pass http://218.28.188.230:81;
proxy_cache EXISTO;
proxy_cache_key $uri;
proxy_cache_valid 200 302 1h;
proxy_cache_valid 301 1d;
proxy_cache_valid any 1m;
proxy_cache_min_uses 1;
}}
server { listen 80; server_name blog.atimg.com;
location / {
proxy_pass http://218.28.188.230:81;
proxy_cache BLOG;
proxy_cache_key $uri;
proxy_cache_valid 200 302 1h;
proxy_cache_valid 301 1d;
proxy_cache_valid any 1m;
proxy_cache_min_uses 1;
}}
server { listen 80; server_name yafan.atimg.com;
location / {
proxy_pass http://218.28.188.230:81;
proxy_cache YAFAN;
proxy_cache_key $uri;
proxy_cache_valid 200 302 1h;
proxy_cache_valid 301 1d;
proxy_cache_valid any 1m;
proxy_cache_min_uses 1;
}}
server { listen 80; server_name safe.atimg.com;
location / {
proxy_pass http://218.28.188.230:81;
proxy_cache SAFE;
proxy_cache_key $uri;
proxy_cache_valid 200 302 1h;
proxy_cache_valid 301 1d;
proxy_cache_valid any 1m;
proxy_cache_min_uses 1;
}}
server { listen 80; server_name atimg.com www.atimg.com;
location ~*.(htm|html|shtml|swf|png|jpg|gif|jpeg|rar|css|js)$ {
index index.php;
proxy_pass http://218.28.188.230:81;
proxy_temp_path /nginx/temp/cache;
proxy_cache ATIMG;
proxy_cache_key $uri;
proxy_cache_valid 200 302 1h;
proxy_cache_valid 301 1d;
proxy_cache_valid any 1m;
proxy_cache_min_uses 1;
}}
server { listen 80; server_name zhuatu.atimg.com;
location / {
proxy_pass http://218.28.188.230:81;
proxy_cache ZHUATU;
proxy_cache_key $uri;
proxy_cache_valid 200 302 1h;
proxy_cache_valid 301 1d;
proxy_cache_valid any 1m;
proxy_cache_min_uses 1;
}}
}
Proxy.conf
程序代码
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header REMOTE-HOST $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
client_max_body_size 10m;
client_body_buffer_size 128k;
# client_body_temp_path /var/nginx/client_body_temp;
proxy_connect_timeout 90;
proxy_send_timeout 90;
proxy_read_timeout 90;
#proxy_send_lowat 12000;
proxy_buffer_size 32k;
proxy_buffers 4 32k;
proxy_busy_buffers_size 64k;
proxy_temp_file_write_size 64k;
# proxy_temp_path /var/nginx/proxy_temp;
proxy_ignore_client_abort on;
proxy_next_upstream error timeout invalid_header http_500 http_503 http_404;
proxy_max_temp_file_size 128m;
简介WebDeploy 是微软开发的用于IIS管理的简单应用程序。WebDeploy通过简单的命令行脚本实现部署在IIS6上应用程序向IIS7应用服务器转移、IIS6应用服务器之间的同步,以及IIS7应用服务器之间的同步等。WebDeploy同步包含了IIS配置和部署的应用程序的同步。值得注意的是,在对IIS进行任何操作之前请进行备份。 应用环境
- .Net Framework 2.0 SP1 或更高版本
- Web Deployment Tool 1.0
- Push 推方式,同步本地服务器推送给远程服务器
- Pull 拉方式,同步远程服务器到目标服务器
- Independent Sync
- 手工同步,打包站点复制到远程服务器。
msiexec /i <msi_filename> /passive ADDLOCAL=ALL LISTENURL=http://ServerName:9999/MSDEPLOYAGENTSERVICE/
-
msi_filename:安装程序名称
-
ServerName:对应机器名称或IP地址
- 9999:表示监听端口
图:测试WebDeploy安装
步骤1 – 查看站点依赖命令:msdeploy -verb:getDependencies -source:metakey=lm/w3svc/1 查看IIS站点配置环境依赖,并在目标服务器进行相应的设置。例如:权限、依赖项等。- IIS6中使用metakey=lm/w3svc/1,其中“1”为网站标识。可以通过IIS管理器,点击站点查看。
- IIS7中使用apphostconfig="Default Web Site",为站点名称。
-
Push:在本地服务器执行
msdeploy -verb:sync -source:metakey=lm/w3svc/1 -dest:metakey=lm/w3svc/1,computername=Server1:9999 -whatif > msdeploysync.log
-
Pull:在远程服务器执行
msdeploy -verb:sync -source:metakey=lm/w3svc/1,computername=Server1 -dest:metakey=lm/w3svc/1 -whatif > msdeploysync.log
若没有访问权限,需要提供用户名和密码,参数:userName,password。IIS同步更新信息写入msdeploysync.log日志文件中。目录地址:Program Files\IIS\Microsoft Web Deploy下。
步骤3-执行IIS同步检查完成后,去除命令中的-whatif标签-
Push:在本地服务器执行
msdeploy -verb:sync -source:metakey=lm/w3svc/1 -dest:metakey=lm/w3svc/1,computername=Server1:9999 > msdeploysync.log
-
Pull:在远程服务器执行
msdeploy -verb:sync -source:metakey=lm/w3svc/1,computername=Server1 -dest:metakey=lm/w3svc/1 > msdeploysync.log
其他 IIS配置备份- 备份:iisback /backup /b <filename>
- 查看备份列表:iisback /list
- 恢复:iisback /resotre /b <filename>
-
保存App Pool配置:
msdeploy -verb:sync -source:metakey=lm/w3svc/AppPools -dest:archivedir=c:\AppPoolConfig,encryptPassword=testIIS
-
还原App Pool配置:
msdeploy -verb:sync -source:archivedir=c:\AppPoolConfig,encryptPassword=testIIS -dest:metakey=lm/w3svc/AppPools
其他资源解决办法:
1.删除360安全卫士或升级他们的软件试下;
2.如果上面的办法不中那就用哥的吧,把下面的代码存成一个bat文件,然后双击即可,双击后再重启一次看看,是不是不报了?是不是很神奇呀,哈哈! ,哥的QQ285584,欢迎交流!
程序代码
reg delete HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\HookPort /f
reg delete HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\HookPort /f
reg delete HKEY_LOCAL_MACHINE\SYSTEM\ControlSet002\Services\HookPort /f