Reputation: 41
I work in a organization that has a certificate *.mycompany.com
I developed a ASP.NET CORE API and hosting my endpoints as windows service. How can i set the host name for my API like myapi.mycompany.com? I can able to browse with servername:port.mycompany.com
There are already some sites configured on the same server which i deployed my application on port 7788
I gave a try and searching all articles in google and stack overflow but none of them understandable to fix that.
Upvotes: 1
Views: 654
Reputation: 3494
servername:port.mycompany.com is not a standard host name format. If you means that you can access the site via servername.mycompany.com:port. Then you should already have a local active domain and DNS forward lookup zone mycompany.com.
So please create an alias(CNAME) api for your host(A) servername.mycompany.com. Then its FQDN should be api.mycompany.com. Once you register DNS.
You should run ipconfig /flushdns and access the website via myapi.mycompany.com. If you don't want to expose port number. Please set your port number ASPNETCORE_URLS
to 80.
Upvotes: 1