Not able to access website with IP adress outside VPS - windows-server-2012

I am facing problem in accessing my website from IP address with a port rather than port 80. I have a VPS and hosted a website in IIS. I created a new website and assigned port as 8080. I am able to access my website as localhost:8080/ but not able to access it through IP-Address:8080/ inside or outside VPS.
But if I host my website in default website as an application then I can access it inside or outside VPS. I am able to access it as localhost/mysitename/ and as IP-Address/mysitename/.

You must go and check your VPS firewall. You must define a rule to open tcp 8080 port on it.

Related

Using domain dns record (A / AAAA / CNAME &etc) to redirrect port

The scenario:
I'm using a dedicated old PC to host a website from my dorm.
I have a domain that I buy from hosting provider such as 1&1, namecheap, &etc
But I have no control over router to enable port forward/trigger.
Since it's the college network.
But I'm using a VPN that allow port forward.
And I have open some port to listen, and able to access the website from internet using the open port. Eg: www.example.com:33333 or vpn_ip:33333
Apache server is set to listen to port 33333 since it's the port number that I open from VPN provider.
My question is:
How do I access the website from internet just using www.example.com. without port number at back
Is there anyway of doing it?
My idea is something like this..
I'm accessing the website using the link www.example.com (port 80)
Then,,, it is possible for domain provider to do something like forward or redirect or etc using something like A record, Cname record & etc
After it successfully forwarded port 80 to 33333. The website is accessible using port 80
Note: I know its impossible access the site using vpn_ip:80 since the vpn itself may use port 80. but how about the domain name?

Change NodeJS local server access URL

Is it possible to change the URL used to access my local NodeJS server?
For instance, I have a Node server running on port 3000, so I can access this server directly through:
http://localhost:3000/
And other users on my network can access it through:
http://[MY_IP_ADDRESS]:3000/
Is it possible to forward this server to a local URL, like http://example/
I know that, in order to remove the port from the URL I need to bind the app on port 80, but I can't find anything about changing de URL.
Not very clear what you want, to be honest and your set-up. You use local computer or server in local network?
If you want URL in your local network isolated - that's not possible hence the URL protocol forwards requests from domain name to certain ip address.
If you want only internal access in your local network you only need to know your local ip address and make sure your firewall allows local connections. Depending on your OS run ip check in cli and voila - that's your ip.
If you want external connections then you need to have a static ip address which you should obtain from your internet provider and afterwards you need to alter you router settings and set up port-forwarding to your local machine. It will then listen to external connections on certain port and forward it to your local machine where nodejs listens (itself or through web-server). Here you can redirect your domain URL name via A-record to your static ip address of your router and port-forward to local machine.
Check out this guide for most routers for external port-forwarding.
UPD: checkout this answer

Can't connect to localhost on my application server but can access it via web

I have a website which is accessible via its URL but strangely i cannot connect to it via localhost on the server itself.
I have ensured that "127.0.0.1 localhost" is in my hosts file
I have checked that no other application is using port 80
I've ticked "Bypass Proxy Server for local addresses"
Pinging my local host from command line returns data When you go to the domain host URL the application loads successfully
Good news is my site is fully functioning but i just cannot figure out how to connect to it on localhost in my browser! any ideas?
Added details as requested;
Its a website not app if that was misleading.
The webserver is IIS on an Amazon EC2 windows instance.
The root URL is just a simple html page, which i can access via the domain URL.
However when i RDP onto the Server itself and try to access the localhost, it continually blocks me, the page wont load.
It is possible that your application is only listening on external IP address. To bind your application on all IP address, you may make your application listen on 0.0.0.0.
And could you please show the related code to help locating the problem?

How to route all traffic to a single port on google compute engine

I'm hosting a node app on the google compute engine. My app is set to listen to the port 8080. I opened up a firewall to allow tcp connections to port 8080. I can connect to my app by entering
http://<your-instance-ip>:8080
in the google chrome browser, where your-instance-ip is the external ip of the compute engine instance. I bought a domain. I want to make it so that when you enter my domain, it redirects you to this specific port. But you can only add the external ip in the A-record of my godaddy domain. How do I route all traffic to that ip, to the specific port 8080? I used nodejs with express. I want to do this using NGINX, could someone point out some tutorials?
Click on 'default' Network and Edit your "default-allow-http", make sure existing "Allowed protocols and ports" is "tcp:80" and target-tag is "http-server" also add "nodejs" in target-tag. Save your changes. Restart your google console. godaddy will listen the port 80

Host a site in local IIS with domain

I want to host a site on local IIS 7.5 for internal testing. But I want people can access over the internet.
For this on my rackspace server, I have created an "A" record with subdomain.domainName.com and pointed my static IP address to it.
In IIS I have created a self-signed certificated with *.domainname.com that it can be used to multiple sites.
Now, i have published a site to a local directory and in IIS I have created a site with host name the same domain for which I have created an "A" record.
I have added http and https bindings with port 80 and 443 with the same host name.
But still my site is not working.
The error I am getting is "This webpage is not available"
Can any one help me?
Resolved it my self.
I was missing Port Forwarding in my router software for HTTPS.
In my web-application, each HTTP request is automatically be converted to HTTPS. And I forgot to forward Port 443's request to the machine to which I have set the static IP Address and DNS.
After adding that port forwarding record to the router's software my application is working fine over internet.

Resources