I have a react application deployed using an Azure virtual machine. To access the app I need to use configured DNS, for example, "http://XYZ.eastasia.cloudapp.azure.com:3000". However, I don't want to include the port num in the URL. How can I port forward in azure so that only by typing 'http://XYZ.eastasia.cloudapp.azure.com' should be enough to access the application?
If you want to users access your app by URL: http://XYZ.eastasia.cloudapp.azure.com, you should run your react app on 80 port. Refer to this post to specify a port to run react app.
Related
I am working on an supply chain management application. I developed frontend of the application in ReactJS and backed in docker and nodeJS. My question is if i deploy my backend i.e NodeJS sdk on docker swarm. Can i access the deployed API's in different computer?
You can achieve service (backend) is reachable from the outside in primarily two ways:
eighter you expose the port of the service directly, and you can then connect straight to it (it is not recommended to do so on any actual deployments) by using ports configuration. By doing so the exposed port will be available to access the service from the outside world.
or you deploy another service which will act as a reverse proxy / API gateway. So the proxy (nginx, traefik, ...) will listen for all incoming requests, check SSL, ..., and then it will forward the request to the right service. This is the recommended way because you hide your actual service behind a proxy, and also put all of the auth/ssl details on the proxy itself, so you free your service from needing to know anything about that technical details.
Goal: Deploy a website to Azure App Service in a container that works from the php-apache base image as has a custom domain with SSL.
Current Situtation:
Website setup to use Dockerfile for building an image
Image uploaded to Docker Hub and successfully built
Image deployed to Azure App Service as a container
Configured custom domain in Azure and pointed DNS to provided IP Address
Problem: How do I configure my container? Currently, I am getting an SSL warning when trying to connect to my website which makes perfect sense as my domain does not match the default certificate azure provides for *.azurewebsite.net (and Azure tells you this when you setup a custom domain, which is neat).
Does Azure pass a request made on 443 to my container on 443 requiring me to configure my container for an SSL connection?
Does Azure terminate the SSL connection and pass the request to my container on port 80?
I understand I need to upload my certificate to Azure, but if Azure is passing the request to my container on 443, that would mean I would need to setup my container to accept requests on 443 and configure the certificate inside the container (which is fairly trivial). However, if Azure terminates the SSL and passes the request over port 80, then my life is a bit simpler as I can just configure my container to listen on 80 and let Azure do the heavy lifting.
If you have any questions, or need clarification please let me know.
From what I can tell, Azure is terminating the SSL connection and passing the request to my container on port 80. I am making this assumption because at this point I am hosting a number of websites in containers and none of them expose 443.
It seems that all that is necessary is to upload your certificate to the Azure App Service Plan and do a bit of configuring to associate it with the correct App Service and website. The container running a website requires no special configuration for SSL.
I'm trying to deploy a Loopback project to live server, all works well on local. On server, after running node ., I get the console log of:
Web server listening at: http://domainname:3000
Browse your REST API at http://domainname:3000/explorer
So it looks like the server is running.
Problem is that I get no response from the server. Neither from domain:3000 or /explorer or any endpoint I created.
Does anyone know what might be the issue?
Thank you very much
I had a similar problem when I was trying to deploy my code. Some of the possible solutions to the problem depending on where and how you are deploying it-
Check if your security group allows connections on port 3000. AWS EC2 by default closes all ports except port 80. You might have to add an exception to your security group and allow port 3000 to be accessed from everywhere.
If you are using a container, check if your container has the ports open and if the container port is accessible by the hardware hosting the container. On Azure, I faced this problem as Azure Web App Container Service by default only listens to port 80 and 8080. So I had to modify my code such that it can use the default NODE_ENV.PORT or 8080.
I have developed 2 applications in spring boot with embedded tomcat. I have one cloud server (Azure) and i have run both the applications in that server. First app running in port 80 and other one in 81. I have domain name registration in GoDaddy For example First app is www.abc.com and the second one is www.xyz.com. How do i configure in azure console that when request comes from www.abc.com then port 80 should serve the request else request would be served by 81. Please help me out configuring deployment.
You should be able to accomplish this by implementing User Defined Routes
https://learn.microsoft.com/en-us/azure/virtual-network/virtual-networks-udr-overview
Additionally, Azure offers Load Balancers and Traffic Mangers that you could implement as well to manage the traffic.
https://azure.microsoft.com/en-us/services/load-balancer/
https://azure.microsoft.com/en-us/services/traffic-manager/
I deployed a web API at port 8090 on an on-prem server. Created a hybrid connection to on-prem server using port 8090. Status is connected. I deployed an Angular application as a Web App to Azure but AJAX request fails with "Name not resolved".
You need to use the fully qualified name of the server your application is hosted on, e.g. http://server.contoso.com/myservice rather than http://server/myservice as you would do locally.