Domain creation on windows machine via IIS - iis

I wanted to create and map a domain(ex: site1.domain1.com) locally to the server running on localhost with some port, I've been trying to do via IIS, but raising port conflict issue, unable to create and start site domain while web server is up since the port is already occupied and vice versa.
Could you please provide how to resolve this or any other simple way to create and map the domain with the server running on localhost.

Related

Local windows service not accessible to the remote computer

I am deploying a React app on a virtual machine, windows server 2012, hosted on the IIS server. The website is successfully running on the local server. When I try to access the website through a remote computer, the static components are rendered successfully, but the API doesn't work. The API is written in node.js and installed as a windows service on the windows server with the port number 5000.
I put localhost:5000 as the axios base url in react. But when I try to access from the remote computer, the computer is reading from its own localhost instead of the server's localhost.
Even if I change the axios base url from localhost to the server's ip address, it still cannot read the API properly.
My questions are as follows:
How to make the remote computer reads from the server's localhost without putting the server's ip address?
How to make the local server's windows service accessible to other computers?
What is the best practice to store the API base url in React in production? (store in.env, config, etc...)?
I just solve the issue and I post the answer here for anyone who has the same issue.
Windows
Create a firewall rule (Windows only)
You need to allow other computers to connect through your firewall.
Open the Windows Firewall
Go to “Inbound Rules”
Click “New Rule”
Select “Port” to make a port rule
Under “Specific local ports”, enter 80 and 8000 (for me it's port 5000)
Select “Allow the connection”
Click “next” then choose a name for your rule.
Source of this answer: [https://otree.readthedocs.io/en/latest/server/adhoc.html#windows][1]

Nodejs Loopback how to access api end points on live server?

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.

How to access website hosted on IIS, from remote computer?

I hosted a website on IIS, running on port 81. I can access it on the server machine from http://localhost:81/test.aspx.
I also can establish a remote desktop connection to the server, using its ip adress server-ip.
Now I want to access the web site using my PC (or any other PC). However, I type type http://server-ip:81/test.aspx on my web browser and the page is not loaded.
I've already opened port 81, by adding a new inbound rule to the server's windows firewall. The exception for World Wide Web Services (HTTP) is also ticked on. I even shut down the firewall entirely, but I still can't access the web site remotely.
Can somebody tell what the problem may be? Thanks in advance.

Starting new port on Amazon Ec2 free tier for socket io

I am using Amazon EC2 service for the web purpose. I have a web application which is hosted on apache i.e port 80. Now i am running a node instance on port 3000 and when i load my website.
io.connect('http:IP ADDRESS:3000');
This code tries to connect to my port. On server side my instance is started. But when i load my we application, this doesnt connect to server.
I was wondering do i need to update my configuration or is there any network settings i need to do ?
Try adding your port in your defined security group.
Follow http://docs.amazonwebservices.com/AWSEC2/latest/UserGuide/using-network-security.html#concepts-security for more reference.

Enable Cross Domain IIS Web Deploy

Is it possible to use Web Deploy (wmsvc) across domains? That is, can I deploy from my dev box/build server in one domain onto a web server in another? I am able to do this inside the same domain so I know that I do have the web deployment service configured properly. However from another domain I can't even get the https://severname.domain.com:8172/msdeploy.axd to challenge for credentials.
The short answer is yes.
WMSVC exposes itself on port 8172, but it uses the https protocol. So long as you have a direct way to get from one network to the other, over that port, it will work.
We run all of our webservers on a DMZ, which is an isolated network with separate DNS, active directory servers, etc. I can directly deploy from my build server (on the *.hq network) to the *.dmz.com server over port 8172.
However, I did have to communicate this requirement to the networking group so that they could allow port 8172 to pass through our firewall. Also, I wasn't able to set up web deploy with automatic Windows Auth because the two networks had different domains and different sets of users.

Resources