So I've got my site setup with nginx and gunicorn.
However I'm not using port 80 for the site, instead I'm using port 8888. Is it possible to tell the domain name to use port 8888 instead of 80 when connecting through mydomain.net
?
Currently I will have to connect with mydomain.net:8888
. Can this be done with nginx if it cannot be done on the domain name side?
No, and you misunderstand the role of the various technologies here.
DNS turns the domain name into an IP address. It has no information about the port to connect to; that can only be changed on the client side, and current web browsers have no mechanism to look up the port dynamically.
You can make it work in nginx, in the sense that you could make nginx serve your application on port 80. Nothing else will work; it can't change browser behaviour any more than anything else can.
Your question is really "can I make browsers connect to a port other than 80, by default, even though they are not told to, when using HTTP?", and still, no.