I am running a Ripple-Rest server on a CrunchBang Linux (Debian) computer. It runs on the port 5990. I ran the server on this computer and it works fine when i view it via localhost but after port forwarding 5990 on my router I cannot acces this server from any other computer via public IP. I have given full permissions to all of the files the server uses as well.
Below are links to screen shots of what I have done:
https://dl.dropboxusercontent.com/u/108273736/capture.png
Please let me know what I can do to get this to work!
I found the best way to do this is proxy it through nginx. That way you can use standard port for accessing the service and leave the ripple-rest service as local.
apt-get install nginx
change /etc/nginx/sites_enabled/default
... add in the following..
server {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;
root /usr/share/nginx/html;
index index.html index.htm;
server_name yourservername.com;
location / {
proxy_pass http://localhost:5990;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
It seems that port 5990 is blocked either from your isp or iptables. You could check on remote if connections to 5990 are allowed by iptables if it is running thst is.
If you would like to run a listener on 80 that forwsrds to 5990 on remote or you could run local port forwarding.
http://blog.trackets.com/2014/05/17/ssh-tunnel-local-and-remote-port-forwarding-explained-with-examples.html
Assuming ssh on 22 is almost always open.
We faced a similar issue on amazon ec2 and our data center:
http://khanna111.com/wordPressBlog/2013/01/05/amazon-web-service-aws-and-vnc/
Related
I bought ubuntu server in digitalocean.
I am connecting my server IP through ssh on my terminal and i create a small node app and after starting the app, I can able to see my app running on my http://myipaddress:nodeport
How i can i connect my domain to this?
I bought free domain from freenom for testing purpose.
By following some tutorials i make a /etc/nginx/sites-available folder into my server and create a file called default and write code like this
server {
listen 80;
server_name sameer.tk; // i bought this domain from freenom
location / {
proxy_pass http://my_private_ip:3004 //with nodeport
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
}
But if i hit sameer.tk after the setup its not working, i even restart my nginx.
You no need any nginx for node server.
You may run node server as 80 port and open 80 port in network security group.
After that, you should point domain to your instance public ip address in your domain management panel.
Ref:
https://www.digitalocean.com/community/tutorials/how-to-point-to-digitalocean-nameservers-from-common-domain-registrars
I have an Azure VM running Ubuntu 14.04. It is running a basic NGINX configuration listening on port 8443 and proxying to localhost 8080 which is being listened to by a service running a script which I am working on.
In my inbound port rules I have opened port 8443 with source IP as my office IP, and destination IP as the VM's private IP, over TCP.
After research I have discovered that you can not ping an Azure VM, though with tools such as psping you can check access to specific ports.
Due to being on OSX I have been trying to use TCPing, trying both DNS and public IP along with port number. I get the response 'port 8443 closed'.
I have checked ports on my VM with netstat and can confirm that nginx is listening on port 8443 and python (my service running a script) is listening on port 8080.
Here is my sites-enabled nginx configuration:
server {
listen 8443;
server_name myServer;
index index.html index.htm index.php;
location / {
proxy_pass http://127.0.0.1:8080;
proxy_read_timeout 600;
proxy_connect_timeout 90;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Proxy "";
}
}
Anything else I can check? Thanks.
You should check all the following :
Network Security Groups
Load Balancer configuration (if exists)
Configure the Linux Firewall
You can also try to ping the VM port using PsPing (If your OS is Windows)
I have a application with UI on Angular and Web API on Nodejs deployed on following Web servers( on the same Windows server say "server1").
Have configured multiple IPs on the server as listed below
UI -- IIS , listening on 10.250.18.51 with port 80 on
server1
API -- NodeJs , listening on 10.250.18.52 with port 80 on
server1. Ultimately will be using Nginx to forward the request to nodejs
Problem Statement
Not able to run both Nodejs and IIS on port 80 even though both listening to different IPs
IIS error : The port is already used by another process
NodeJs Error : EACCES, Permission denied
Am I missing something ?
Regards
Although they are running on different IP, They are running on the same machine so on the very same machine you can not run two processes on the same node.
As you are using nginx the best solution would be making a reverse proxy for node process.
Use different domains for both processes and use Nginx to forward them like the following:
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name www.xxx.me xxx.me;
# your IIS config for nginx
}
# slack
server {
listen 80;
server_name xxx.xxx.me;
location / {
proxy_pass http://localhost:7777;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
}
Above snippet assumes that your node process is running on 7777
I am having troubles setting up NodeJs to work together with Nginx.
I have added forward of the subdomain to an IP address of my server. (when I ping subdomain it gives me the server IP address).
This is my config in /etc/nginx/sites-enabled/default
server {
listen 80;
listen [::]:80 default_server ipv6only=on;
server_name chat.mydomainname.com;
location / {
proxy_pass http://localhost:3000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
}
My NodeJs server is running on port 3000 and I can access it via browser successfully on url http://MYIPADDRESS:3000
I noticed when I restart nginx server (service nginx restart) that I don't get any output that I usually should get.
I have tried to check what is on port 80 and does something blocks nginx from running. I killed those processes (which were all nginx) and I started it again, but no luck.
I am using Ubuntu 16.04 on Digital Ocean. (I have added subdomain on DigitalOcean also)
Can someone see some obvious mistake here?
Thanks!
I'm working on localhost and Windows OS. NGINX run on port 80 and Node.js app(Ghost) run on port 2368.
I want to use NGINX as front web server for Ghost app. So in nginx.conf file I wrote:
server {
listen 80;
server_name localghost;
# change above to example.com in production mode
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $http_host;
proxy_pass http://127.0.0.1:2368;
}
}
NGINX directory is C:\nginx, Ghost directory is C:\nginx\www\ghost.
http://localghost address is not opening Ghost app. How can i do that?
Does localghost resolve to anything?
If you are testing on your development machine, then I would suggest to just use localhost and be done with it.