I am trying to link a page running on my local machine to my reserved domain name, but it does not seem to get picked up.
I have installed nginx on an ubuntu 18.04 machine. I have a simple hello world tutorial folder with the following conf settings:
server {
listen 81;
listen [::]:81;
server_name api.<my_domain>.net;
root /var/www/tutorial;
index index.html;
location / {
try_files $uri $uri/ =404;
}
}
I enabled dynamic dns with my hosting provider. Then I generated the following settings with ddclient, entering the data as given by my hosting provider under step 2 here: https://www.strato-hosting.co.uk/faq/webshop/this-is-how-easy-it-is-to-set-up-dyndns-for-your-domains/
# Configuration file for ddclient generated by debconf
#
# /etc/ddclient.conf
protocol=dyndns2
use=web
server=https://dyndns.strato.com/nic/update
login=<my_username>
password='<my_dyndns_password>'
api.<my_domain>.net
I also edited the dhcp client to true:
# Configuration for ddclient scripts
# generated from debconf on zo 9 jan 2022 21:20:14 CET
#
# /etc/default/ddclient
# Set to "true" if ddclient should be run every time DHCP client ('dhclient'
# from package isc-dhcp-client) updates the systems IP address.
run_dhclient="true"
# Set to "true" if ddclient should be run every time a new ppp connection is
# established. This might be useful, if you are using dial-on-demand.
run_ipup="false"
# Set to "true" if ddclient should run in daemon mode
# If this is changed to true, run_ipup and run_dhclient must be set to false.
run_daemon="true"
# Set the time interval between the updates of the dynamic DNS name in seconds.
# This option only takes effect if the ddclient runs in daemon mode.
daemon_interval="300"
If I try the following from another laptop I get these results:
<internal_device_ip>:81
works from a laptop on the same network<external_ip_address>:81
works from a laptop on an external networkapi.<my_domain>.net:81
failsI feel like I am missing some simple configuration setting to connect the last dot.
It threw the error because I had not added api.<my_domain>.net
as a subdomain with my hosting provider. Once I did, I could access api.<my_domain>.net:81
from an external browser.