Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

191
Views
Web Socket en proxy inverso APACHE

Ejecuto dos servidores detrás y una estación base AEBS. Server1 ejecuta 10.12.6 y Server 5.3.1 y realiza un PROXY REVERSO con aplicaciones web, como se describe en el tutorial de precursor.ca. Esto me permite tener solo una dirección IP externa donde server1.mydomain y server2.mydomain se distribuyen internamente. Esto funciona bien... pero en el servidor 2 ejecuto Filemaker Webdirect, que usa sockets web. Entonces aparece en el navegador un error wss://. I la aplicación web que escribí;

de http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#proxypass

 RewriteEngine On RewriteCond %{HTTPS} =off RewriteRule . - [E=protocol:http,E=port:80] RewriteCond %{HTTPS} =on RewriteRule . - [E=protocol:https,E=port:443] SSLProxyEngine on SSLProxyVerify none SSLProxyCheckPeerCN off SSLProxyCheckPeerName off SSLProxyCheckPeerExpire off ProxyPreserveHost On ProxyPassReverse / http://1.2.3.4:443/ ProxyPass / http://1.2.3.4:443/ ServerName filemaker.precursor.ca

Obviamente poniendo mi propia dirección IP de server2 y su nombre...

Sin embargo, el socket web wss://server2.mydomain no funciona... y web direct falla.

Puedo iniciar sesión, pero tan pronto como abro una conexión wss, ya no funciona. .Es un error de apache mod_proxy..

en el registro de errores de apache leí [dom 19 de abril 21:58:04.846046 2020] [proxy_http:error] [pid 598] (70008) Los resultados parciales son válidos pero el procesamiento está incompleto: [cliente 189.62.112.162:49213] AH01110: error respuesta de lectura

en el navegador leo

 WebSocket connection to 'wss://fmserver.embatek.com.br/fmi/webd/PUSH?v-uiId=1&v-pushId=341172cf-5d45-454d-972e-3029de5807fa&X-Atmosphere-tracking-id=0&X-Atmosphere-Framework=2.3.2.vaadin1-javascript&X-Atmosphere-Transport=websocket&X-Atmosphere-TrackMessageSize=true&Content-Type=application/json;%20charset=UTF-8&X-atmo-protocol=true' failed: Unexpected response code: 500

Cualquier pista sobre dónde tocar el violín. tuyo pedro

over 4 years ago · Santiago Trujillo
2 answers
Answer question

0

Ha pasado mucho tiempo, por lo que es posible que ya se haya resuelto.

Acabo de encontrar el mismo problema. Usé nginx en mi entorno, pero se resolvió pasando los siguientes valores al servidor.

 proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; proxy_cache_bypass $http_upgrade;

El código final en nginx es el siguiente

 upstream filemakerserver-webdirect-upstream { server xxxxxx.xxx:443; } server { listen 80; server_name yyyyyy.yyy; if ($host = yyyyyy.yyy) { return 301 https://$host$request_uri; } return 404; } server { listen 443 http2 ssl; server_name yyyyyy.yyy; location / { try_files $uri @filemakerserver-webdirect-upstream; } location @filemakerserver-webdirect-upstream { proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-Server $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_cache_bypass $http_upgrade; proxy_pass https://branch-office; } ssl_certificate /etc/letsencrypt/live/yyyyyy.yyy/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/yyyyyy.yyy/privkey.pem; }

El siguiente es un artículo que escribí sobre esto en japonés.

https://qiita.com/Hi_Noguchi/items/82bc17913b646bd6583f

Espero que esto ayude en el entorno apache.

over 4 years ago · Santiago Trujillo Report

0

Estoy usando apache y la conexión segura se detiene en el proxy, así que supongo que podría modificar la configuración del host virtual que estoy usando (a continuación) cambiando ws por wss, 80 por 443, etc. si su servidor FileMaker está usando una conexión segura. 10.1.2.3 es la dirección interna del servidor de FileMaker. Puede haber algunas cosas redundantes aquí, pero funciona.

 <IfModule mod_ssl.c> <VirtualHost *:443> ServerName my.external.server.name RewriteEngine on RewriteCond ${HTTP:Upgrade} websocket [NC] RewriteCond ${HTTP:Connection} upgrade [NC] RewriteRule /(.*) "ws://10.1.2.3:80/$1" [P,L] # <Location /> ProxyPreserveHost On ProxyPass "/fmi/webd/PUSH" "ws://10.1.2.3:80/fmi/webd/PUSH" ProxyPassReverse "/fmi/webd/PUSH" "ws://10.1.2.3:80/fmi/webd/PUSH" ProxyPass / http://10.1.2.3:80/ ProxyPassReverse / http://10.1.2.3:80/ # Order allow,deny # Allow from all # </Location> SSLCertificateFile /etc/letsencrypt/live/my.external.server.name/cert.pem SSLCertificateKeyFile /etc/letsencrypt/live/my.external.server.name/privkey.pem Include /etc/letsencrypt/options-ssl-apache.conf SSLCertificateChainFile /etc/letsencrypt/live/my.external.server.name/chain.pem </VirtualHost> </IfModule>
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!