Search code examples
wordpressnetworkinglamp

DYNU website domain redirects to router login


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.]

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. 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. 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. 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


Solution

  • 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 also disabled its dhcp server functionality because my router already does that 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.