DYNU网站域名重定向到路由器登录页面。

huangapple go评论108阅读模式
英文:

DYNU website domain redirects to router login

问题

我最近使用Apache将我的Raspberry Pi托管了一个WordPress网站,所以我对这方面非常新手。我目前正在努力让DYNU为我托管一个域名,并希望它将流量定向到我的Raspberry Pi。

我为我的Raspberry Pi保留了一个静态IP地址,然后将端口80(协议TCP)和端口443都转发到了该IP地址。然后,我使用www.whatismyip.com查找了我的公共IP地址。我去DYNU并更新了我的域名的IP地址为那个IP地址。

当我访问我的网站的域名时,它将我重定向到一个新的路由器登录页面。[长话短说,有一个我不知道的桥接设备,我必须在上面设置端口转发。]

所以我运行了ipconfig来找到我的默认网关和我的IPv4地址的另一个版本。当我使用其中一个值作为我的域名的IP地址时,它再次将我重定向到一个登录页面,这次略有不同。不要这样做;如果你输入你的路由器IP,那么你肯定会被重新定向到它。

我无法从我的家庭网络外部访问我的网站域名。当我在URL中输入我的Raspberry Pi的IP地址时,它像平常一样托管网站。

我是不是输入了错误的IP地址?

编辑:
在我的wp_config文件中,我有两行定义了site_url和site_home为我的Raspberry Pi的IP,因为如果我不这样做,WordPress会尝试重定向到RPi以前的IP地址。当我尝试将其更改为我的域名时,现在网站显示“无法访问”。当我输入我的IP地址时,网站加载,但当我转到/wp-admin时,网站再次重定向到我的一个路由器登录页面,现在当我再次转到我的域名时,它重定向到我的路由器而不是无法访问。

编辑2:我的路由器不是直接连接到我的调制解调器,而是连接到一个Calix桥接设备。我认为这是问题的原因。

感谢你的帮助。

英文:

I recently got my Raspberry Pi hosting a WordPress website using apache, so I am very new to this. I'm currently working on having DYNU host a domain name for me and I want it to direct traffic to my raspberry pi.

I reserved a static ip for my rpi and then forwarded port 80, protocol tcp, to that ip address. I also forwarded port 443 to it. Then, I used www.whatismyip.com to find my public ip. I went to DYNU and updated my domain's IP to be that IP address.

When I went to my website's domain, it directed me to a new router login page. [long story short, there was a bridge device I didn't know about and I had to set up port forwarding on it.]

<strike>So instead I ran ipconfig to find my default gateway and a different version of my ipv4 address. When I used either one of those values for my domain's IP, it directed me to a login page again, this time slightly different. </strike> don't do this; if you enter your router's ip, then you'll be garunteed to get routed back to it.

I cannot access my website's domain from outside of my home network. When I type in my Raspberry Pi's IP address into the url, it hosts the website like normal.

Am I entering the wrong IP address?

Edit:
In my wp_config file, I have 2 lines that define the site_url and site_home to be my raspberry Pi's IP, because if I don't have them, then wordpress tries to redirect to an old ip that the RPi had.<strike> I tried changing it to my domain name, and now the website "can't be reached."
when I entered my IP address, the site loaded, but when I went to /wp-admin , the site redirected to one of my router login pages again, and now when I go to my domain name again, it redirects to my router instead of being unreachable. </strike> tldr- change site_home and site_url to domain address, not ip, and give it a few minutes to change.

Edit 2: My router is not connected directly to my modem but is instead connected to a Calix bridge device. I believe this is causing the issue.

Thank you for the help

答案1

得分: 0

我查看了桥接设备并为其启用了端口转发。直到我转发了https(端口443),它才能正常工作,尽管我的网站当前是http。我意识到我可以直接通过桥接设备而不是我的路由器,所以我保留了DHCP并将http和https直接转发到我的树莓派,而不是转发到我的路由器,然后再转发到我的树莓派。

英文:

I looked at bridge device and turned on port forwarding for it. It didn't work until i forwarded https (port 443), even though my site is currently http. I <strike>also disabled its dhcp server functionality because my router already does that</strike> realized that I can just go through the bridge device instead of my router so I kept dhcp on and forwarded http and https straight to my rpi, instead of to my router, and then to my rpi.

huangapple
  • 本文由 发表于 2023年6月29日 02:17:55
  • 转载请务必保留本文链接:https://go.coder-hub.com/76575749.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定