ijd8.COM

A simple blog for an old Ma Nong.

BAE 不让绑域名了,用nginx 反向代理绑定域名

Permalink

BAE 已经对未绑定域名的解绑,对未备案的域名可以通过ngix 反向代理访问,实现域名“绑定”。nginx 的配置参考:

BAE 不让绑域名了,用nginx 反向代理绑定域名

plaintext: nginx 反向代理 https://pylist.com/t/1325678280
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
###BAE
server {
    listen 80;
    server_name www.yourdomain.com;
    
    location / {
        proxy_redirect off;
        proxy_pass http://yourapp.duapp.com;
        proxy_set_header Host "yourapp.duapp.com"; 
        proxy_set_header X-Real-IP $remote_addr; 
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        access_log off;
        error_log off;
    }
    
}

参考 《使用nginx 反向代理给SAE 应用绑域名

Write a Comment

Submit Comment Login
Based on Golang + fastHTTP + youdb | go1.16 Processed in 2ms