I am trying to host my first website + service.


#My server setup

I have a static webpage in server 1. A gotosocial installation in server 2. They are connected to a reverse proxy (server 3). This has a public IP of (not exact) 204.230.30.104.


#My router setup

I can open ports 80 and 443. I just don’t know to which IP (I’ll explain why down).


#My registrar

In have a domain, say ‘newexample.com’. The @ has an A record for the IP (not exact) 208.145.80.33


#My confusion

  1. If I want to make a subdomin for GoToSocial like ‘gts.social.new example.com’, do I use CNAME or A record?
  2. If I want to serve the static website to be served at ‘www.newexample.com’ , do I remake an A record for www.newexample.com ?
  3. There appears to be a CNAME in my DNS record already by the registrar for www that goes to some “redirect” link. What’s up with that?
  4. How do I make the domain connect to my server and how to make the server connect to my domain properly?
  • Zagorath@aussie.zone
    link
    fedilink
    English
    arrow-up
    2
    ·
    7 hours ago

    Your 142.x.x.x will be your public IP address. All devices on your network share that public IP. They all have a unique private IP address too, accessible only on your network. It probably starts with 192.168.x.x, but it could be 10.x.x.x or even less likely 172.16–31.x.x.

    If you want to operate a web server that users can go to by typing https://youdomain.com/, you’ll need to forward from ports 80 and 443 through to the internal IP address of your server, using the “port forwarding” settings on your router. What port on the internal IP you route to depends on how your server is configured. But a basic default configuration is fairly likely to be 80 and 443, too.

    Since you have a reverse proxy, all traffic from your router should go to that. Then you use that to send the appropriate traffic to the appropriate server based on whatever rules you want to apply. (e.g. siteone.mydomain.com goes to server 1, sitetwo.mydomain.com goes to server 2, or mydomain.com/siteone goes to server 1, etc.).