I'm streaming

Using a specific port with DNS A Records

Configuring DNS on a domain is pretty straight forward, we can leverage the A record. What happens when we want to point to a specific port that we are forwarding to? To do so, we need to edit the apache2 settings to recognize to incoming domain name and make it access the proper port. You can do so by editing the apache2 000-default.conf file and adding in a virtual host entry.

`nano /etc/apache2/sites-available/000-default.conf`

<VirtualHost *:80>

    ProxyPreserveHost On

    ProxyPass / http://0.0.0.0:1234/

    ProxyPassReverse / http://0.0.0.0:1234/

    ServerName hemstreet.io

</VirtualHost>

Now that we have an entry in our virtual host. We need to restart the apache2 server `sudo service nginx restart`.
After the apache server restarts we can load up our domain. In this case it’s hemstreet.io and we can see that it is no longer pointed to the default port, instead it load the port we specified!

An inventive, entrepreneurial and positively unsatisfied mind that constantly pushes the tech boundaries to create new solutions and devices that change people’s lives.

Leave a Reply