IIS - How to specify a FastCGI TCP Transport Port - iis

I am attempting to configure a FastCGI server on Windows 7 / IIS8 which needs to use TCP as it's protocol.
There is an option to use "TCP Protocol" when setting up the FastCGI application, but documentation is really scarce on how this works.
http://msdn.microsoft.com/en-us/library/bb448989(v=vs.90).aspx
How does one:
Specify a port to use
Find the port IIS wants to use when the process starts? (There doesn't appear to be any arguments when IIS spawns the process)

Related

Run node js application without port

I wants to run my application without assigning any port on my current IP address on port 80. How it will possible.
If your node.js application is a web server, you cannot remove the port. No port, no web server. Trying to make a web server without a port is like trying to make a locomotive with no railroad.
You can use the default port however. When users give browsers URLs without ports, they automatically apply the default port. For URLs like http://example.com/ or http://10.11.12.13/ the default port is 80. For https://example.com it's 443, and you need to use the https server class.
So, you can make your server listen on port 80.
In development you will run into a problem with this approach. On OSX, Linux, and other UNIX-derived OSs, only the privileged (root) user can run servers that use port numbers less than 1024. The typical development cycle of edit / run / test is a huge hassle, and a security hole, when you need privileges to run. That's why the node.js examples use port 3000.
In production, many people use nginx as a reverse proxy server to relay http requests from port 80 or https requests from port 443 to your node.js server at port 3000. You can read about how to do that; it's far beyond the scope of a Stack Overflow answer,

what port tomcat7 use? how do I set AWS Security group?

I run a tomcat7 in ubuntu in aws. not use apache.
and my site use default tomcat port 8080.
I don't want to open port except 8080 so I'm setting in aws security group.
inbound
8080 TCP anywhere
and outbound allTraffic.
but I try to rest call to
http://my_aws_ip:8080/test.do
but it doesn't work.
What should I open the port?
Does tomcat7 use a some port?
Tomcat uses whatever port or ports and protocols you configure it to use. By default it listens for HTTP requests on tcp/8080, AJP requests on tcp/8009, and service management requests on tcp/8005.
This is configured in Connector elements in $CATALINA_HOME/conf/server.xml:
https://tomcat.apache.org/tomcat-7.0-doc/config/http.html
You should reconfigure Tomcat to listen on standard ports like tcp/80 for HTTP and tcp/443 for HTTPS. Non-standard ports are a ready indication of a novice deployment.
The AWS Security Group should be configured to allow HTTP, HTTPS, pr both depending on your need. I highly recommend using HTTPS unless the information being transferred is public domain or has no value.
You can check what ports Tomcat is using on your EC2 instance with netstat -anpt. It will show all active and listen ports and the programs that have bound them (including java or tomcat for your Tomcat ports).
Unless you really need root access to the OS, you might want to consider using Amazon Elastic Beanstalk as it manages all that cruft for you.

Configure XSockets to use the handshake port

From my understanding, WebSockets has been designed to traverse firewalls and proxies. Indeed, after an handshake between the client and the server, the communication protocol will change from HTTP to WS but it will still communicate on the port used to establish the handshake. (See websocket.org).
In other words, if a client can do an HTTP request on a given port, he will also be able to do WS on the same port.
However, according to XSockets configuration documentation, the port used for WS communications isn't the same as the HTTP port. Unlike a regular WS connection, a NAT on the firewall seems to be required to allow communication between the XSockets server and the client.
Is there a way to configure an XSockets server to re-use the HTTP port used for the handshake (port 80) without creating conflicts with the existing web applications hosted on the same web server (IIS)?
You are right. But, the application listening on the web port, should be able of understanding WebSocket protocol in order to do the handshake, and that is not the case of IIS < 8.
If you want to have your WebSocket running on the same port than your web application, you need IIS 8 (included in Windows >= 8 and >= 2012).
As far as I know XSocket allows you to use IIS8 as hosting environment: http://xsockets.net/docs/hosting#using-iis8
But if you have IIS < 8 , then it is not possible. It is not a XSocket limitation, it is a IIS limitation.

significance of node.js port choice

I am a bit new to server side scipts. I am fairly capable with javascript so I decided to take a look at node.js as opposed to php or python ect. Correct me if I am wrong but it seems that when I code my webserver I may freely choose the port number I listen to. Is there any significance to this port number or may I choose any random number I wish? Will anyone be able to send a request to my server regardless of the number I choose?
Thanks in advance!
If you want to run node.js directly without any supporting web server or reverse proxy (no nginx, varnish, apache, etc), you need to listen on port 80 for HTTP and (optionally) 443 for HTTPS if you want normal URLs to work. Otherwise users will need to type the port number in the URL like http://example.com:3000 which is unheard of for public-facing sites.
However, you almost certain DO want to use a separate web server as I describe in detail here, in which case any port over 1024 is fine.
If you have root access you can choose any port that's not already bound to a process.
If you do not have root access you can choose any port above 1024 that is not already bound to a process.
Port 80 is usually the one you want to use if you're serving up HTTP, however, you can access an HTTP server on any port via the URL port syntax. For example, a server on port 3000. http://yourdomain.com:3000
If you're running on Linux and you do not want to run your Node process as root, you can redirect port 80 traffic to another port.

Can WebORB "share" a port with another site in IIS?

I'm using WebORB for .NET and I've had no problems with it running on its default port (2037) in my development environment.
When I deploy it to my staging environment and attempt to access it over the public internet, this port is blocked at many points along the way as it's an uncommon port, and I observe a red WebORB logo with the message "can not connect to messaging server" when I access the WebORB console.
Opening the port is a partial solution, but anyone accessing WebORB's applications will also need to ensure they're not blocking that port... so it's not really a proper solution.
I have managed to get WebORB running on port 443 (which is used for SSL, and therefore almost never blocked), but only if I have no other sites in IIS with a port 443 binding.
This is also unacceptable as I will eventually have another site on the same server with a port 443 binding.
So, my question is: is it possible to run WebORB on port 443 (or 80), when another site in IIS is also bound to that port?
Update following answer
I'm on Server 2008R2, and therefore IIS7.5, and I'd prefer to run my WebORB website in integrated mode. The instructions in the first article mention adding a wildcard script map for Isapi.dll - this will only be invoked in classic mode.
I've added all of the entries that the article suggests, and have configured my site to use port 80. There are other sites bound to port 80 in IIS.
When I navigate to the WebORB console, I'm observing the same behaviour I saw before adding the new RTMPT handlers - a red WebORB logo and no entries appearing in the "Messaging Server" panel. However, I do see the "Bad request, only RTMPT supported." message when navigating to ~/open/1, and my diagnostics.aspx page looks fine.
In the log I see the following:
...
WEBORB INFO:adding child scope for - \root
WEBORB INFO:scope registered - \root
WEBORB INFO:WebORB Messaging Server 4.4.0.0 (c) 2003-2010 Midnight Coders, Inc.
WEBORB INFO:is running - False
WEBORB EXCEPTION:System.Net.Sockets.SocketException (0x80004005): An attempt was made to access a socket in a way forbidden by its access permissions
at System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress)
at System.Net.Sockets.Socket.Bind(EndPoint localEP)
at Weborb.Messaging.BaseRTMPServer.start()
WEBORB INFO:shutting down WebORB Message Server
WEBORB INFO:loading type: Weborb.Management.ServiceBrowser.Browser.AssemblyBrowser
...
Do I need to alter any other config to enable the console to use RTMPT?
Also, given that incoming requests must be over HTTP, is there no way to consider host headers?
what you are asking is whether you can route RTMP connections via port 80 or 443. Since these ports are managed by IIS, the incoming connections must be HTTP-based. Your RTMP clients can connect via port 80 or 443 by using RTMPT or RTMPS respectively. In that case, you do not need to "run WebORB on these ports", but instead configure WebORB to use RTMPT or RTMPS. Please see the following doc:
Configuring RTMPT in WebORB: http://www.themidnightcoders.com/fileadmin/docs/dotnet/v4/guide/rtmpt.htm
Configuring RTMPS in WebORB:
http://www.themidnightcoders.com/fileadmin/docs/dotnet/v4/guide/rtmps_support.htm
Hope this helps.
UPDATE: If the goal is to route the management console's traffic via RTMPT, it will not work with the currently released version. The console can dynamically determine the RTMP port, but it will stick to the RTMP protocol and does not have the code to switch to RTMPT. This is something we will look into.
As for the exception you're getting, it occurs because the port you specified in Global.asax is already taken by some other process.

Resources