Author: ezradharris

  • Setup Cloudflare DNS Proxy for Server

    Recently when setting my WordPress site, one of the requirements I wanted to meet was having a proxy server protect it. Basically, a proxy server is where another person’s server hides the original IP of the base server. For example, this image:

    In my case, I wanted my public IP to be not seen by using domain IP lookup tools. And possibly misuse it for malicious intents. (Such as DDoSing)

    After a little googling around, I discovered that Cloudflare had the free proxy option when you use their service. So I switched over nameservers to Cloudflare instead of GoDaddy nameservers, and it copied over the current DNS records. I just had to change the A record with the “orange cloud” enabled. The “orange cloud” is the switch on whether or not a DNS record has the proxy enabled or not

    above: Orange cloud means proxy is enabled, and grey is direct DNS enabled

    This tool can be handy for many hosting cases such as Minecraft Servers and Web hosting.

    I definitely recommend using Cloudflare for Proxy and DNS management, as they have many useful tools, including redirects for domains.

  • How to Fix URL Change When Hosting on Raspberry Pi – WordPress

    Recently when setting up my WordPress website on my Raspberry Pi, One mistake I made was to change the URL to the website to “192.168.1.24.com” instead of “192.168.1.24”, which means that if I try to connect to the website, it’s just going to redirect to a non-existent URL. Thus I could not connect to it via web address at all. But after about an hour of googling and researching, I was able to fix it, and here are instructions just in case you happened to run into the same issue:

    Instructions:

     

    First, ssh into your Pi, then type

    cd /var/www/wordpress/wp-content/themes/yourtheme

    (This changes the directory to the themes directory) and replace “yourtheme” with the name of your theme. Then type:

    sudo nano functions.php

    once in paste this code right after the “<?PHP” line:

    update_option( 'siteurl', 'http://example.com' );
    update_option( 'home', 'http://example.com' );
    
    

    (this code overwrites the already chosen URL in the admin webpage) and, of course, don’t forget to replace the HTTP//:example.com with your desired URL. After that, press CTRL+X to exit, then hit Y to save the code. Now restart the Apache with:

    sudo service apache2 restart

    or if you are using Nginx, do:

    sudo systemctl restart nginx

    For additional help, visit these links:

    https://wordpress.org/support/article/changing-the-site-url/

    https://www.raspberrypi.org/forums/viewtopic.php?t=33246

    And that’s all if you have any questions or want to contact me an email: [email protected].

  • New Domain For EzraCodes Blog! (update)

    I just changed the domain of my second blog from Ezracodes.posthaven.com to Coding.EzraHarris.com.(more details on Ezracodes later.) You can still access my second blog via the link at the top of this blog or even still use the link Ezracodes.posthaven.com.

    Want to know more about how I did it? Click here.

  • Raspberry Pi 4 Octoprint Setup

    In the last few blog posts, I reviewed the RPI Night Vision Camera from MakerFocus and the OctoSlack plugin for Octoprint. Still, I will explain the troubleshooting and setting up of Octoprint ender-3.

    About two weeks ago now, I had found an old Raspberry Pi 7″ Touchscreen in my closet from my older brother. I instantly thought of setting it up with Octoprint, so I grabbed a Raspberry Pi and started researching using a touchscreen with Octoprint. I found a plugin called Octoscreen that is used for a Raspberry Pi Touchscreen for a user interface of Octoprint. I needed a plugin similar to this one because it will usually display the CLI (Command Line Interface) instead of loading an easy UI to use. So after a couple of tutorial watching, I got to work on setting up my Octoprint once again. Unfortunately, I ran straight into a problem. This was the same problem I have had before. The Raspberry PI would not connect to my Wi-Fi router. After about six hours, I got it to kind of work with an old Wi-Fi adapter, but after a restart the next day, it stopped working again.

    So instead, I ordered a new Raspberry Pi, the current one I was using was about seven years old because my brother Nicholas used to use it. Once the new Raspberry Pi arrived, after about 5 minutes of looking at it and its specs, I installed Octoprint on it, and after installing Octoscreen, everything was set. Except for printing the case. I found this case on Thingiverse and went straight to printing. Once it was finished printing, I put it together and added the final touches with also printing a case for the camera. It is now set up and ready to go.

    If you want to see more of my projects, follow my Instagram since I post many videos and pictures there.