accessing the nginx page hosted on a port forwarded machine - Red Hat Linux - node.js

i have a domain, which points to different IP addresses(Red Hat instances) when different port numbers are given along with the domain name.
like "mydomainname:51011 ---> 10.2.34.56",
"mydomainname:51012 ---> 10.2.34.57",
"mydomainname:51013 ---> 10.2.34.58".
I can currently SSH into the machines using putty and providing different port numbers with the domain name. and no GUI access as of now.
My Question -
I have nginx setup on machine "10.2.34.56". How do i view its page on my browser.
Also, please suggest how i can access a node server running, on say port 50001 on that machine.
Thanks,
EDITS:
nginx is up and running - i am trying to access ""mydomainname:51011"" in my browser, but it does not seem to work.
i can see the text "SSH-2.0-OpenSSH_5.3" in the browser, when i put the above URL

Related

Stop apache and run node server

I have a centos 7.9 linux server with whm panel installed. Apache is installed directly on the domain names I created, I don't want to run apache on the subdomain of one domain name. I want to run a node js server. When I say "service httpd stop", they all shut down. What to do?
Network services don't bind themselves to specific hostnames. You have one Apache server running. Any connection to port 80 will connect to that server. Apache then looks at the host header in the HTTP request to determine which website to respond with.
If you want one site to use Node.js then you need to pick one of these options:
Configure Apache to act as a reverse proxy for the Node.js hosted server
Run the Node.js server on a different computer and point the host name at that computer
Have multiple network interfaces for the existing computer, with their own IP addresses, configure Apache to listen on one and Node.js to listen on the other, then point the hostnames at the right IP addresses.
(I don't recommend the last one as it is the most fiddly).

How to access remote machine nodeserver url from my system if both the systems are behind proxy

Suppose if my ip address is : 192.65.35.12. In this machine I'm running node server. I can access the webpages by using this url: http://localhost:3000/ in the same machine.
But, if I'm trying to access the node server from a remote machine having the ip 192.65.35.11. It does not work. I used the below url to access the url from the remote machine: http://192.65.35.12:3000/
I'm facing network connectivity issues.
Do, I need to change any settings in node.js for remote access.
Then, how can I access the node server from the remote machine.
if you can access localhost:3000, then type in 192.65.35.12:3000 on same machine. and if you are having problems connecting, then no outside computer going to connect. and you need to adjust your nodejs settings.
if you have server at home, and trying to connect from some place else not at home. you are more likely looking for something like "dynamic ip address" example: http://www.noip.com/ it helps getting past ISP (internet server providers) and your own routers, and publishing your ip address.
if you are dealing with 2 computers in your same house or business and passing through your own router, try changing the 192.65.35.12 to DMZ. basically by passing all router safety, if that happens, you are not opening correct ports on the router. or not setting other setting correctly.

Accessing NodeJS server from remote machine on local network shows a blank page

I wanted to test my ReactJS + NodeJS website on another machine on my LAN, so I changed the server host ip from localhost to 0.0.0.0 as described in this answer. I noticed that although I could access the server from a remote machine, all I could see was the title and favicon (the rest was a blank page). I tried another approach of using the ngrok module as described here (which happens to be the answer to the same question as the previous link). I still got the same blank page.
The GET requests to the server are shown below (as shown by ngrok).
/landing is a page I was trying to access. Can someone explain whats happening?
PS: The server is running on a Mac and I'm trying to access the page on an Ubuntu machine. Also, I'm using this react-redux boilerplate. Webpack is also being used along with hot reloading.
Did you try changing port settings in firewall?
Go to firewall settings and allow the respective port for inbound

Accessing local IIS website in a workgroup from another PC using the host name

I've a local website in my IIS 7.5 and the hostname I specified as samplesite.com and have added the bindings as * and the IP of my PC 192.168.1.2.
Also added the host entry in hosts file
Everything working fine in my local machine when I enter samplesite.com in browser. But my problem is I cant access the site from a PC in my same workgroup. How can I make it possible or what are the steps I've to do in both pc to make it work.
If you want to browse a website on another pc's IIS, you need to type 192.168.1.2/websitename from the remote pc.
First of all, you should check that the firewall, which is set up on the machine with the site, does not block 80th port.
Then you have two options:
you either remove host name from the bindings and use the machine ip (http://192.168.1.2) as the site url everywhere in your local network
or you have to add host enry 192.168.1.2 samplesite.com to hosts file on every machine where you whant to get access to the site. In this case you can continue to use http://samplesite.com url.

How can I access a website configured with host headers in IIS on the local machine?

When using host headers to host multiple websites on the same IP address in IIS, is there any way of accessing that website from a browser running on the local machine?
This is normally required when a given web component only allows configuration from the local machine. It's also useful when things like ASP.Net's built in error handling isn't working and you can only view the error in the browser but don't want to allow remote users to see it.
This has baffled me for a while and everytime I come across it I end up giving up in frustration and reconfigure stuff so I can accomplish such tasks remotely.
Added: #Ishmaeel - modifying hosts doesn't seem to help - you either get a 400 error (if all websites have host headers) or whichever site is configured without a host header.
Just an idea: Mapping the hostname to 127.0.0.1 in the hosts ($WINDOWS$\system32\drivers\etc) file may help. This way you should be able to pull up the local IIS site by typing the hostname as if it's a remote server
Maybe I am not understanding the question, but what's wrong with just typing in the URL for the website? If it's the matter of domain name resolution, you can point to the right DNS or put it in hosts file.
eed3si9n -- if you are trying to access a url locally and you use host headers you cant just type in the url: for example you have 2 websites (website1.com website2.com) on 1 server using host headers. the local ip of the web server is 192.168.1.50 --> if you type in 192.168.1.50 you will get a 'page cannot found'. if you put in the url website1.com or website2.com you will be accessing the sites from the outside (not locally).
so the problem is how to access the sites locally not from the outside -- for example i need this ability so that i can access locally as the test sites are only available locally. not from the outside...
You can try telnetting to the server.
$ telnet localhost 80
(type these lines manually)
GET / HTTP/1.1
Host: www.example.com
(exchange www.example.com for the host name your server is mapped to)
I would assume the only way you can do this is assigning a custom port to the specific website you want to monitor and just access it as "localhost:CustomPort".

Resources