Update the Nginx web server settings to redirect the URL.
Update the Nginx web server settings to redirect the URL.
I've just configured a web server using nginx on Ubuntu 20.04 and am hosting a client site. I set up port forwarding to route TCP/80 traffic to the server's internal IP. On my iPhone, I connect via cellular to my public IP on port 80, but the site loads continuously and then switches to the device's internal IP. The UFW rules allow TCP/80 traffic, yet the page doesn't appear. Could you help?
This site appears to be a webpage that might be sending you to an incorrect address. It's recommended to connect via port 443 and ensure HTTPS is enabled.
Check if it functions within the system. Test the browser at 10.0.0.1 on the same device, and also on another machine connected via Wi-Fi or LAN. If it operates smoothly there, the firewall appears properly set up. Examine port forwarding configurations on your router to ensure it consistently assigns the same IP address (10.0.0.1) to your server. Verify there’s an option to forward port 80 to the correct internal IP address where you can input both 80 and 10.0.0.1. Retry accessing the site, but this time use your public IP address (find it via a search) at port 80, such as http://80.0.0.1. Open Chrome developer tools (CTRL + SHIFT + I), go to the network section, enable "Preserve log," and attempt access. You should only see requests to external resources. It seems the port forwarding is correct, but a redirect on your site might be altering the hostname. For example, a link pointing to 80 might instead go to 10.0.0.1. This will work internally, yet externally users may encounter issues and see errors on the internal IP.