NAS端:
NAS默认是自带Nginx的,我们进入NAS后,打开控制面板—应用程序门户—反向代理服务器
添加规则:
协议:可以选择HTTP或HTTPS
主机名:输入想要代理的域名即可
端口:属于Nginx反向代理的端口
目的地:
协议:HTTP或HTTPS
主机名:默认为localhost也可以输入NAS的网卡IP
端口:为网站映射的端口或本身需要映射的端口(本人用的网站端口是180)
原理:本人NAS建立的网站是Docker容器的本机180端口,访问此网站时会先访问180端口,然后群辉内的Nginx反向搭理又把180端口转发到Docker的80端口,这样使得我们访问80端口时会经过Nginx反向代理的跳转从而可以访问域名80端口
以上操作完成后,我们就可以通过代理好的域名(主机名)来访问原本需要加180端口才能访问的网站啦
服务器端:
首先我们添加一个站点,域名可以设置我们想要反向代理的域名
然后打开网站设置,点击反向代理
目标URL:想要反向代理的IP+端口,比如:我这个网站建立用的是8090端口,所以如下图
发送域名:发送域名可以使用默认的$host(默认的站点域名),也可以输入想要反向代理出去的域名
上述操作完成后,我们打开网页浏览代理好的域名就可以了,这样子就完成了直接输入域名就可以访问本来需要加端口才能访问的网站
由于本人用的宝塔选择Nginx反向代理,以下是反向代理的配置,大家也可以根据百度进行反向代理设置:
#PROXY-START/
location ~* \.(php|jsp|cgi|asp|aspx)$
{
proxy_pass http://120.77.84.70:8090;
proxy_set_header Host $host;
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;
}
location /
{
proxy_pass http://120.77.84.70:8090;
proxy_set_header Host $host;
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;
add_header X-Cache $upstream_cache_status;
#Set Nginx Cache
proxy_ignore_headers Set-Cookie Cache-Control expires;
proxy_cache cache_one;
proxy_cache_key $host$uri$is_args$args;
proxy_cache_valid 200 304 301 302 1m;
expires 12h;
}
#PROXY-END/
文章有(47)条网友点评
best over the counter viagra https://viagrasus.com/
price of viagra https://viagrasus.com/
buy generic 100mg viagra online pfizer viagra 100mg price mexican viagra
buy real viagra online sildenafil citrate tablets 100 mg where to buy viagra
online doctor prescription for viagra sildenafil 20 mg best place to buy generic viagra online
what is ivermectin for stromectol gale ivermectin cost in india
ivermectin 12 mg tablet buy petsmart ivermectin ivermectin pour on for sheep
stromectol for humans for sale stromectol 12 mg tablets stromectol for humans for sale
ivermectin injections stromectol for humans for sale stromectol for humans for sale
stromectol for humans for sale ivermectin liquid stromectol covid 19
clomid for sale buy clomid buy clomid
buy clomid 50mg where to buy cheap clomid online clomid for sale canada
clomid for sale clomid clomid tablets
buy clomid 50mg online clomid for sale buy clomid
ivermectin without a doctor prescription stromectol without a doctor prescription prescribing stromectol
stromectol price usa stromectol for humans for sale stromectol pills for humans
cialis coupon cialis cialis coupon
sildenafil 100 mg sildenafil 100 mg lowest price viagra pills
stromectol 12 mg tablets stromectol for sale stromectol 3 mg tablets price
prescribing stromectol stromectol for sale stromectol without a doctor prescription
ed dysfunction treatment erectile dysfunction drug ed drugs list
erectile dysfunction drug top erection pills best ed treatment
best otc ed pills treatment for ed best pill for ed
india pharmacy mail order india pharmacy mail order generic drugs without doctor’s prescription
legitimate online pharmacies india meds online without doctor prescription buy prescription online from india
what is the best ed pill buy ed pills ed medications
prescription drugs without doctor approval dog antibiotics without vet prescription pain meds without written prescription
ed medications list cheapest ed pills online cheapest ed pills online
finasteride generic generic propecia prescription propecia 5mg sale
how does ivermectin work ivermectin for covid treatment how to treat heartworms with ivermectin
where to buy ivermectin for dogs ivermectin-pyrantel ivermectin sheep drench
ivermectin stock price today stromectol for chickens ivermectin pills for dogs
drugs for ed ed drug prices cheap erectile dysfunction pills
is ivermectin safe ivermectin pills human ivermectin 3 mg dose
best ed pills non prescription buy prescription drugs without doctor cvs prescription prices without insurance
propecia sale where can i buy propecia propecia buy without per
mectizan stromectol how much ivermectin to give a dog with sarcoptic mange ivermectin for dogs dosage in ml
discount stromectol ivermectin and alcohol ivermectin empty stomach
stromectol and herbs pig wormer ivermectin ivermectin for dogs fleas
prices of viagra at walmart muse ed drug shots for ed
real cialis without a doctor’s prescription buy medication online buy prescription drugs online legally
can you buy prednisone in canada prednisone for sale prednisone daily use
real viagra without a doctor prescription levitra without a doctor prescription ed meds online canada
where can i buy ivermectin for humans ivermectin 10 mg ivermectin-metronidazole-niacinamide
viagra without a doctor prescription
top erection pills
ivermectin rabbits ivermectin pharmacy ivermectin protocol