dktucson

Self hosting your own website can be a fun project. You can host your own personal space or side gig page. Sure, there are free hosting options but remember...you get what you pay for.    I have lost “free” sites in the hosting platform server migration or maintenance.. With the Quadra, there is no Go Daddy. You are Your Own Daddy. This article assumes you are in the worst possible position to host a site. You are behind a residential gateway with a dynamic IP from your ISP and they block port 80 for home accounts on outbound serving. The following assumes you have already booted up the Quadra and have gotten updates, set your root password etc. This also assumes you have a good basic grasp of networking

 

Step 1.: Assigning a static IP to the Quadra

If you are using a router to share your internet connection with all of your devices, the router normally hands out internal IP addresses via DHCP (dynamic host communication protocol) so after reboots & router resets your PC may get a different internal IP address every so often. A sever needs to be locatable at a known address so we need to assign a static IP to the Quadra.

If we go up to the upper right hand corner of the screen you’ll see date & time, sound volume as well as network settings.

Right click on network settings and click on Connection Information. Jot down the current IPV4 address. In this case it was 192.168.0.6

1.png

We can set the Quadra to always use this IP address so we don’t have to worry about it getting assigned a different one. Go back up to the Network Connection icon in the upper right. Right click and this time choose Edit Connection.. Double click on the active connection    and go to the IPV4 tab. Set Method to Manual and Add the address you saw from the Connection Information screen. Note: The following shot pertains to my system & basic network. Your default gateway (base address of your router) may be different as well as your DNS servers. The settings below are related to my network and my ISP-- Comcast.

Once you save the settings the Quadra will always take that IP address on each boot.

2.png

Step 2.: Forwarding your default listening port to the Quadra

Here in the US, it’s a common practice for internet providers to block port 80 and the running of mail servers, web servers etc from residential connections. They are more than happy to sell you a “business connection” at roughly 3 times your current residential rate. Or they may not block you but if you start generating traffic and they detect it they may pull your service or otherwise penalize you.

For this exercise I opted to use port 83 as a non-standard port for web hosting. This port needs to be forwarded or reserved for our static Quadra address of 192.168.0.6.

Bring up a web browser and put the base address of the router (in my case 192.168.0.1) in the address bar and hit go. It should bring you to your router login page. Login with your credentials and find the entry point for Port Forwarding.

You would Add New.. The internal & external port should both be 83 and the IP address should be the one reserved for the Quadra , in this exercise 192.168.0.6

3.png

Step 3: Get Apache Webserver for the Quadra

Go to terminal mode and type

sudo apt update

This will update the local package index.   

Follow this with the next command :

sudo apt install apache2

This will install Apache & all of the dependencies. You will see an new entry in the /etc folder    of /apache2 . Also, in /var you will see a /www/html folder was added and an index.html file in the folder..

We need to tell Apache to listen on port 83 instead of the default port 80.

In Terminal type

sudo thunar

This allows us to use the file manager in root mode privileges to quickly edit otherwise UN-writable files. Navigate to /etc/apache2/ports.conf file and edit the listening port to our agreed upon port 83. Save the file & exit

4.png

Restart Apache service with the following command:

sudo systemctl restart apache2

 

In a web browser type in http://localhost:83 and you should get the Apache test page

5.png

 

That’s It!! the basic webserver is setup. The next step is to make it accessible from the outside world.

Step 4: Getting a Dynamic DNS hostname to make your site easy to find

The internet uses Domain Name Servers to translate a bland IP address like 69.189.47.105 to an easily remembered name like myblog.com. Since we are not paying for a site and we are not operating on the standard port 80 we need some help from 3rd party providers like No-Ip.com or Dyndns.com. These companies will assign a domain name to your “webhop” public ip address and your desired port. If your public IP changes from your ISP they update the name to that new IP address. It’s like your mail getting forwarded to a new home.

No-IP.com will give you a free address from one of their sub-domains. They do ask that you log into their forum once a month to keep the connection alive. I have an account at DynDns as I do security cameras on the side and this service is also useful for viewing security cameras in phone apps.

Go first to www.whatismyip.com and see your public facing address. Jot that down.

Go to your dynamic dns provider and create a Webhop or Web Redirect domain name

as we see here. Put in your public IP address followed by the desired port and create your easy to find domain name

6.png

It may take about 15 minutes for the web hop name to become active.. While thats doing it’s thing lets get rid of that Apache Test Page.

 

Step 5: Get a free HTML template and edit it as needed

If you google “Free HTML Templates” you’ll find gobs & gobs of good stuff out there. Download a zip file    and extract the contents to maybe your documents folder as a staging spot.

Go to Terminal and type

sudo thunar

This launches the file manager as root as we did earlier when we edited the apache files. Now go to the folder where you extracted the web template files and copy them to the clipboard. Navigate to the /var/www/html folder and rename that existing index.html to index.old. The existing index.html was the test page that we saw earlier. Paste your copied files there. Edir your newly coipied index.html in mousepad and make text changes as you see fit. Save your edits. If you mess up anything you still have the original template files in your documents or downloads folder as backup.

If it’s been more than 15 minutes since you created that web hop host name test out your name address.

In this case I chose quadrawebserver.from-az.net and look at that... I have my site up.

7.png

That’s it.    We’ve done it. You now have a simple site of your creation under your control on your hardware. To backup your site just copy the contents of /var/www/html to a usb drive in case of disaster.

 

Daniel Keating Tucson Az

 

 

 

 




 

 

Reply 4 0
Glidedon
Thanks !  very helpful.
Reply 0 0
mod81
Personally i prefer to use Cloudflared tunneling so I can then use my own domain name such as .COM .NET etc rather than the ones you get from the dynamic DNS providers.
As long as the domain name is set up to use the cloudflares DNS name servers and you install the cloudflared app on linux, it doesn't cost anything as it works with the free cloudflare plan.
It also handles the IP address changing but with the added benefits of hiding your home IP address, getting passed any blocks your ISP might have on port 80, it can traverse through a firewall / router without needing to open ports and you also get Cloudflares DDOS protection for free.
Do a google search for setting it up a Raspberry Pi with Cloudflared and you will find there are quite a few tutorials on how to do.
Reply 0 0
dktucson
The only advantage with using no-ip freebie is that there is no domain fee. If I had a premium TLD  that I had already registered cloudflare would be an avenue for sure.
Reply 0 0
Reply