Nginx配置yum源

Nginx 配置文件

我这里使用的是虚拟主机

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
server {
listen 80;
server_name mirrors.local.com;

location / {
root /opt/mirrors/html;
index index.html index.htm;
}

location ^~ /centos {
alias /opt/mirrors/centos/;
autoindex on;
autoindex_exact_size off;
autoindex_localtime on;
charset utf-8,gbk;
}
}

制作友好提示页面

/opt/mirrors/html放置index.html作为首页帮助文件

1
2
3
4
5
6
7
8
9
10
11
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
</head>

<body>
<h1>yum源</h1>
......
</body>
</html>
打赏
  • 版权声明: 本博客所有文章除特别声明外,著作权归作者所有。转载请注明出处!
  • Copyrights © 2018-2024 Outsrkem
  • 访问人数: | 浏览次数:

      请我喝杯咖啡吧~

      支付宝
      微信