web01搭好的网站copy到web02

yum nginx phpphp

从web01 传输文件给web02html

修改nginx的配置文件nginx

[root@web01 html]# cat /application/nginx/conf/nginx.confweb

worker_processes  1;app


error_log  logs/error.log error;ide

pid        logs/nginx.pid;orm


events {htm

    worker_connections  1024;blog

}rem


http {

    include       mime.types;

    default_type  application/octet-stream;

    sendfile        on;

    keepalive_timeout  65;

    log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '

                      '$status $body_bytes_sent "$http_referer" '

                      '"$http_user_agent" "$http_x_forwarded_for"';

    include extra/*.conf;

}


记得先备份



scp -p22 extra/* 172.16.1.7:/application/nginx/conf/   推送extra下的文件给web02 前提是里面没有目录 目录推不过去

先在web01上打包而后再传

[root@web01 html]# tar zcf bbs.tar.gz bbs/*

[root@web01 html]# tar zcf blog.tar.gz blog/*

[root@web01 html]# tar zcf www.tar.gz www/*

[root@web01 html]# ls

50x.html  bbs  bbs.tar.gz  blog  blog.tar.gz  index.html  www  www.tar.gz



开始推送

推送过去的是压缩文件 打开后就是目录了

scp -p22 bbs.tar.gz 172.16.1.7:/application/nginx/html/

scp -p22 blog.tar.gz 172.16.1.7:/application/nginx/html/

scp -p22 www.tar.gz 172.16.1.7:/application/nginx/html/

相关文章
相关标签/搜索