I have a web application hosted on local server. Which we have opened for public use by masking this local IP to public IP provided by ISP. So now website is accessible with public IP.
We required to make it used by https, so I generated the SSL Certificate on public IP from zero SSL. This is working without any issue.
Now there is need to use this web application with URL with domain name instead of IP. I created sub domain from the cPanel of our website and directed it to Public IP by editing A Records for sub domain. Now web application is accessible with URL as required but it takes SSL certificate generated for public IP, so shows alert icon on URL bar.
So current scenario is, when web application is opened, request goes to my Hosting server, which route to firewall masked public IP because of "A" Record configuration at cPanel host. This request further goes to local IP of my web app server.
Subdomain on domain hosting --> Public IP on firewall --> Local Server
Is there any way to, generate SSL Certificate for subdomain and assign directly to server?
Directly giving public IP to local server is one solution, but we want to avoid it. Any other solutions are accepted.