Forward HTTP requests to WordPress

In order to use the same domain name for your website hosted externally and things like Node-Red running on a server at home you need to redirect some of the internet traffic.

In order to redirect traffic on port 80 (HTTP) to my blog hosted at WordPress.com I used  the trick described in my previous tutorial on setting up a Pi with Node-Red.
Since that I have switched to HTTPS (port 443) so we can not use Node-Red anymore to do the forwarding of HTTP traffic. Instead we will run a webserver on the Pi redirecting all visitors to an external website using HTTP. (The site itself will redirect to a HTTPS connection).

Lets get started.

sudo apt install apache2
sudo service apache2 start

Edit the index.html located in /var/www/html
pi_RED___etc_mosquitto_—_ssh_pi_red_local_—_238×70

That’s it! off-course you need to forward port 80 of your home router to your Pi so HTTP traffic will go from your router > pi > external site. 

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Create a website or blog at WordPress.com

Up ↑

%d bloggers like this: