worker_processes 1; events { worker_connections 1024; } http { include mime.types; default_type application/octet-stream; sendfile on; keepalive_timeout 65; server { listen 80; server_name localhost; location / { autoindex on; root html; index index.html index.htm; } } server { listen 80; server_name repo.zabbix.com; location / { autoindex on; root html/zabbix; index index.html index.htm; } } server { listen 80; server_name sp.repo.webtatic.com mirror.webtatic.com; location / { autoindex on; root html/webtatic; index index.html index.htm; } } }
最后使用浏览器访问
在linux服务器中设置解析
[root@m01 ~]# cat /etc/hosts 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 10.0.0.1 mirrors.aliyuncs.com mirrors.aliyun.com repo.zabbix.com
附件:cwrsync + 全部 bat 脚本 与 nginx + 配置文件 可以到Linux公社资源站下载:
------------------------------------------分割线------------------------------------------
具体下载目录在 /2017年资料/11月/21日/在Windows上搭建镜像yum站的方法(附bat脚本)/
------------------------------------------分割线------------------------------------------