+
95
-

nginx镜像网站如何配置?

请问nginx镜像网站如何配置?

网友回复

+
15
-

比如我们想通过nginx来建一个github镜像站,我们假设你的域名是www.example.com,当你打开这个域名的时候,内容其实是www.github.com;

那么我们只要在nginx.conf下增加一下配置文件:

server {
    server_name www.example.com;
 
    location / {
        proxy_pass https://www.github.com/;
 
        proxy_redirect https://www.github.com/ /;
        proxy_COOKIE_domain github.com www.example.com;
 
  ...

点击查看剩余70%

我知道答案,我要回答