Need some assistance for setting up a subdomain when there is already a webserver

Hi!

I just bought a domain at Namecheap.com.
I have a server with just one IP and I would like to run Discourse on the port 8080 as 80 is already occupied by my website.
When I want to setup an A record for discourse with the port 8080, namecheap says that it’s not a valid IP adress.

Any help is highly appreciated!

Ports are completely out-of-scope in terms of DNS.

DNS maps names to IP addresses.

Port associations is done on your server, not in the DNS.

3 Likes

So what should I use instead in this case?

You’re putting yourself in a very complex territory.

What I can suggest is to run discourse on a subdomain or in a subdirectory.

1 Like

Yeah, I want to run it on a subdomain! But I don’t know how to tell my nginx proxy that you’re coming from the subdomain.

Create an A Record for sub.example.com with the IP address where You host forum

Then in nginx proxy,

use server_name sub.example.com;
And forward all requests to docker container running discourse.

3 Likes

ooooh! Didn’t think of that! Thank you so much!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.