Tornado Webscoket with IIS 8.5 and Helicon Zoo - iis

I`m trying to install Tornado server with webscoket Handler under the IIS with Helicon Zoo help.
Http Tornado works well (behind IIS with Helicon Zoo help)
Websocket tornado works well being installed on separate port.
How can I setup the Helicon Zoo to enable websocket in such configuration?
I found, that Helicon substitutes headers with own values:
[('Origin', 'http://xxx'),
('Via', '1.1 xxx (squid/3.5.25)'),
('X-Zoo-Appl-Virtual-Path', '/tornado'),
('X-Zoo-Appl-Physical-Path', 'C:\inetpub\wwwroot\tornado'),
('X-Forwarded-For', 'xxx'),
('Sec-Websocket-Version', '13'),
('X-Zoo-Forwarded-Protocol', 'http'),
('Sec-Websocket-Key', 'xxx'),
('Host', 'xxx'),
('X-Zoo-Forwarded-Host', 'xxx'),
('X-Zoo-Real-Ip', 'xxx'),
('Cache-Control', 'max-age=259200'),
('X-Zoo-Forwarded-Port', '80'),
('X-Zoo-Forwarded-For', 'xxx'),
('X-Zoo-Forwarded-Server', 'xxx')]
outcoming handlers are ok, checked with wsdump.py
websocket client reports error #400
would appreciate any help

Zoo runs web applications behind IIS using sort of proxy. Although latest IIS versions do support Websockets to some degree, the current version of Zoo proxy does not support bypassing of Websocket protocol. Sorry for the inconvenience.

Related

Windows IIS with Next js App Internal Server Error 500

I'm trying to deploy my Next.js app on VPS Windows 10 with Plesk panel and Windows IIS.
The problem is I created domain name from Plesk panel and it works fine. And I have localhost for Next.js app on port 3000 I'm trying to connect to localhost:3000 with the domain using IIS rewrite Reverse Proxy
IIS rewrite Reverse Proxy:
But it gives me internal server error 500:
I tried this on React.js and Next.js, and Next.js with Express custom server. Still the same error.
But when I try with Vue.js or Node.js express server, it works just fine.
And when I open port like this domain.com:3000 it also works with react and next.
What can I do?
After searching for a while I found the solution problem is the iis can't use Url Rewrite proxy if you using gzip and Next.js provides gzip compression to compress rendered content and static files so to fix this error you need to turn gzip off or enable gzip on iis.
If you want to disable the gzip on next js follow this
https://nextjs.org/docs/api-reference/next.config.js/compression
If you want to using gzip enable gzip on iis this wll help you to using gzip
https://techcommunity.microsoft.com/t5/iis-support-blog/iis-acting-as-reverse-proxy-where-the-problems-start/ba-p/846259
Here I found the solution:
https://learn.microsoft.com/en-us/archive/blogs/friis/iis-with-url-rewrite-as-a-reverse-proxy-part-2-dealing-with-500-52-status-codes

Phusion Passenger + Apache + Node.js app runs on http but not https. 404 Error

I have a Phusion Passenger Node.js application configured with cPanel that ran perfectly on my primary domain. I created a new application that uses the same path but switched the domain to another domain on my account. On the old domain: ghv.xie.mybluehost.me, the application worked on both http and https.
http://ghv.xie.mybluehost.me/portal
https://ghv.xie.mybluehost.me/portal
On the new domain: csmithcpa.com, the app only works on http. https returns a 404 error.
http://csmithcpa.com/portal
https://csmithcpa.com/portal
I am not sure how to debug this or why it would return a 404 at all on https but completely work on http. Any help would be fantastic.
EDIT: I will keep adding useful information for debugging as more people ask questions about it.
cPanel/WHM access
Apache server
Phusion Passenger application manager
Node.js web application
-portal
--app.js
--node_modules
-public_html
--ghv.xie.mybluehost.me site files
--csmithcpa
---csmithcpa.com site files

How to connect node server via apache?

We have angular application running in apache and jboss servers in CSR approach. Now we are moving to SSR approach to implement SEO.
So we are trying like request should go to Apache then redirect to nodejs and then jboss.
In box1, apache has been installed.
In box2, nodejs and jboss has been installed.
I have tried like proxypass /node http://:/node. But it is throwing proxy error "The proxy server received an invalid response from an upstream server."
Aapche version : 2.4
node : v11.5.0
npm : 6.4.1
Angular CLI: 6.1.5
Much appreciate if anyone could help us.
Suggest if any other approach is there to implement SEO.
PS: we can't replace apache and jboss with other servers.
If you just need SEO, try to use prerender. It also has solutions for apache and much more

HTTP request failed after listening on multiple ports or enabling SSL Module on my Linux Board

I have one Custom Linux board on which I want to
run apache web server (httpd) to test HTML
and other web based pages.
I have configured, cross compiled and installed httpd (2.2.24, 2.4.1, 2.4.4 and 2.4.9 packages) on my Linux PC (Ubuntu 12.04 LTS) as well as
on my own custom Linux board. Then I have added support of SSL Module (mod_ssl) to test HTTP as well as HTTPS request.
Both HTTP and HTTPS request works fine without any issue on my Linux PC (Ubuntu 12.04 LTS). But when I tried to execute same HTTP request
on my Linux Board using httpd (2.4.4 and 2.4.9 with SSL Module Enabled) at that time browser page goes into loading state and can not be came out from that situation.
Also I have seen that HTTPS request works fine at that time ( not HTTP )
I have also did some debugging task through wire-shark tool and found that connection is established successfully after sending request through HTTP
but can not get response of that request. I have also found that response of that HTTP request received on wire-shark after closing that HTTP
requested page from browser.
Also, I can run HTTP and HTTPS requests successfully using httpd (2.2.24 and 2.2.27 with SSL Module enabled) on my Linux Board as well but failed to execute same request
using httpd (2.4.X with SSL Module enabled) package.
I have also changed some configurations by creating different virtual host for HTTP (Port 80) and HTTPS (Port 443) but still failed to
execute that HTTP request.
I have also tried to listen on different ports like (Listen 80 and Listen 8000) without SSL module (using httpd 2.4.4. and 2.4.9 ) at that
time HTTP request goes into loading state.
Basically all thing works in version 2.2.x but not in 2.4.x.
Does anyone has idea about this issue or help me to solve this type of issue?
I have faced similar type of problem while requesting HTTP Page on multiple Listen Directive in my custom linux board.
Please configure APR Package with ac_cv_o_nonblock_inherited=no flag and configured int with httpd package which will solve HTTP request failed issue on multiple Listen Port.

HTTP Error 500.0 - Internal Server Error Calling LoadLibraryEx on ISAPI

I have installed the iisnode in windows server(Windows server 2008, IIS 7.5).I can check the sample application from iisnode. Samples are working fine.And also i created the application inside the C:\inetpub\iisnode\www\ folder. It's also working fine. But when i move my application into my domain it causes the problem. First it showed the error like
HTTP Error 500.21 - Internal Server Error Handler "iisnode" has a bad
module "iisnode" in its module list
For that i have changed the Enabled 32 bit application false.
After this i'm getting error like
HTTP Error 500.0 - Internal Server Error
Calling LoadLibraryEx on ISAPI filter "C:\Program Files
(x86)\Parallels\Plesk\isapi\urlprotect.dll" failed
I installed the following version of node and iisnode IISNode:
iisnode-full-iis7-v0.2.2-x64 Node : node-v0.10.24-x64 Server : Windows
server 2008 IIS Version: IIS 7.5
My domain has been integrated with Parallels Panel 11.0. Please help any one how to solve this issue and run my node application for my domain.
I think this is because urlprotect.dll is 32 bit application, but iisnode is 64 bit.
You need either remove urlprotect.dll ISAPI Filter from IIS or install a 32 bit version of iisnode.

Resources