分类 标签 存档 黑客派 订阅 搜索

反向代理

163 浏览
server {
    listen       80;
    listen       443 ssl;
    server_name  localhost;

    ssl_certificate      /etc/nginx/ssl/fullchain.cer;
    ssl_certificate_key  /etc/nginx/ssl/unsplash.jingxuetao.com.key;

    location /api {
        rewrite  ^.+api/?(.*)$ /$1 break;
        proxy_pass        https://api.unsplash.com;
    }

    location /images {
        rewrite  ^.+images/?(.*)$ /$1 break;
        proxy_pass        https://images.unsplash.com;
    }

}

参考链接

https://www.cnblogs.com/gabrielchen/p/5066120.html
https://www.jianshu.com/p/b34a57129d6c?from=timeline

--EOF--

评论  
留下你的脚步
推荐阅读