-1

First of all, hi and thank you for reading.

I have a website in a paid VPS with an assigned domain name as:

my-website.com In the DNS configuration I point the A record to the X.X.X.X and as default it uses port 80 where I have a wordpress site. At this moment everything is OK

In this server I also have a FLASK API running on port 5000 therefore I can access the API as X.X.X.X:5000/API or my-website.com:5000/API.

What I want is to use the API on the subdomain api.my-website.com

So far I have read that a Proxy like Nginx can do the job, but I am using Apache2 for the Virtual Ports of the website. Somebody has a tutorial on how to do this? Also I read about changing he SRV registers but I wasn't unable to make it work.

Thanks in advance

I Tried changing apache for NGINX but my website broke

  • I’m voting to close this question because , as the dns tag states: DNS QUESTIONS MUST BE PROGRAMMING RELATED. Use this tag for programming questions related to writing code that interacts with the Domain Name System (DNS); for example, writing code that uses gethostbyname() – Rob Aug 28 '23 at 08:54

1 Answers1

1

StackOverflow is mainly focused on programming related questions, so you'd likely be better served directing similar queries to SuperUser in the future.

Nevertheless, you shouldn't need to switch from using Apache to NGINX in order to do this. Apache also has functionality for virtual hosts. You may want to refer to the this post to help get a basis on doing so.

Best of luck.

Hexolan
  • 36
  • 3
  • Your first paragraph is the reason not to answer this question. Do not answer off topic questions. [answer] Vote to close instead. – Rob Aug 28 '23 at 08:55