forsaken mail 反向代理配置

singlecolor 63 0

前期准备

1.用到的站:http://f.omail.cc/

2.解析过去,不多说

3.我用的是宝塔,然后设置反向代理。

原效果:

forsaken mail 反向代理配置

 

内容替换后效果:
forsaken mail 反向代理配置

 

附上代码:

location ^~ /
{
    proxy_pass http://f.omail.cc;
    proxy_set_header Host f.omail.cc;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header REMOTE-HOST $remote_addr;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection $connection_upgrade;
    proxy_http_version 1.1;
    # proxy_hide_header Upgrade;

    add_header X-Cache $upstream_cache_status;
    #Set Nginx Cache

    proxy_set_header Accept-Encoding "";
    sub_filter '<div class="ui hidden divider"></div>
<div class="ui container">
    <div class="ui message">
        <div class="header"> OMAIL.cc 临时邮箱</div>
        <div class="content">本服务无人维护,运行于甲骨文。</div>
        <div class="content">如需使用自己的域名,直接创建域名cname记录到 <a href="http://f.omail.cc"><strong><u>f.omail.cc</u></strong></a>,
            等待DNS 生效即可.</div>
    </div>
</div>' '';
    sub_filter 'OMAIL.CC' '单色临时邮箱';
    sub_filter '<svg t="1645508920353" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3551" width="40" height="40"><path d="M831.050 146.15h-638.1c-66.375 0-119.7 53.55-119.7 119.7v492.3c0 65.92 53.55 119.7 119.7 119.7h638.325c66.15 0 119.7-53.545 119.7-119.7v-492.525c-0.225-66.15-53.775-119.475-119.925-119.475zM636.425 465.425l270.238-212.85c0.67 4.275 1.125 8.55 1.125 13.050v492.3c0 10.125-1.8 19.795-5.4 28.795l-265.963-321.295zM196.105 189.125h632.033c24.75 0 47.25 11.25 61.875 29.25l-382.963 294.3-372.595-294.525c14.661-17.779 36.691-29.026 61.348-29.026 0.106 0 0.213 0 0.319 0.001zM121.405 786.725c-3.375-9-5.4-18.67-5.4-28.795v-492.305c0-4.5 0.45-9 1.125-13.275l270.67 213.295-266.395 321.080zM192.95 834.433c-19.125 0-36.675-3.613-50.4-14.633l276.3-330.533 75.375 67.733c7.2 5.85 17.55 5.85 24.525 0.225l85.95-67.275 276.3 330.075c-13.725 11.025-31.275 15.088-50.175 15.088l-637.875-0.68z" fill="#4E8CEE" p-id="3552"></path><path d="M195.979 188.45h632.038c24.75 0 47.25 11.25 61.875 29.25l-382.958 294.3-372.605-294.525c14.625-17.775 36.675-29.025 61.65-29.025z" fill="#BAD4FF" p-id="3553"></path></svg>' '<img src="https://data.fsclub.cn/favicon.ico">';
    sub_filter '<title>omail.cc - 临时邮箱</title>' '<title>单色临时邮箱</title>
    <link rel="icon" href="https://data.fsclub.cn/favicon.ico">';
    sub_filter_once off;
    set $static_fileUpFe2opZ 0;
    if ( $uri ~* "\.(gif|png|jpg|css|js|woff|woff2)$" )
    {
        set $static_fileUpFe2opZ 1;
        expires 1m;
    }
    if ( $static_fileUpFe2opZ = 0 )
    {
        add_header Cache-Control no-cache;
    }
}

发表评论 取消回复
表情 图片 链接 代码

分享