tunneling secure websocket connections with apache

I’ve got it working. Scenario ————- —————- ———- | Browser |<—–>| Apache httpd |<—–>| Tomcat | | | SSL | 2.4.9 | SSL | 7.0.52 | ————- —————- ———- Browser WebSocket through Apache httpd, reverse proxying to the web app in Tomcat. All SSL front-to-back. Here’s the configuration for each piece: Browser Client Note the … Read more

Apache + Tomcat: Using mod_proxy instead of AJP

The settings you are looking for are: <VirtualHost *:80> ServerName public.server.name ProxyRequests Off ProxyPreserveHost On <Proxy *> Order deny,allow Allow from all </Proxy> ProxyPass / http://localhost:8080/ ProxyPassReverse / http://localhost:8080/ </VirtualHost> Note that we’re using localhost as the proxy target. We can do this since we enable ProxyPreserveHost. The documentation states that It is mostly useful … Read more

Apache + Node.js + mod_proxy. How to route one domain to :3000 and another to :80

Just make two <VirtualHost *:80> tags <VirtualHost *:80> ServerAdmin [email protected] ServerName www.node-example.com ProxyRequests off <Proxy *> Order deny,allow Allow from all </Proxy> <Location /> ProxyPass http://localhost:3000/ ProxyPassReverse http://localhost:3000/ </Location> </VirtualHost> <VirtualHost *:80> ServerAdmin [email protected] ServerName node-example.com ProxyRequests off <Proxy *> Order deny,allow Allow from all </Proxy> <Location /> ProxyPass http://localhost:80/ ProxyPassReverse http://localhost:80/ </Location> </VirtualHost> It … Read more

apache to tomcat: mod_jk vs mod_proxy

A pros/cons comparison for those modules exists on http://blog.jboss.org/ mod_proxy * Pros: o No need for a separate module compilation and maintenance. mod_proxy, mod_proxy_http, mod_proxy_ajp and mod_proxy_balancer comes as part of standard Apache 2.2+ distribution o Ability to use http https or AJP protocols, even within the same balancer. * Cons: o mod_proxy_ajp does not … Read more

Authorization header missing in django rest_framework, is apache to blame?

If you are using Apache and mod_wsgi, then I found the easy solution to this in the official Django REST framework website Apache mod_wsgi specific configuration Note that if deploying to Apache using mod_wsgi, the authorization header is not passed through to a WSGI application by default, as it is assumed that authentication will be … Read more

NGINX to reverse proxy websockets AND enable SSL (wss://)?

Just to note that nginx has now support for Websockets on the release 1.3.13. Example of use: location /websocket/ { proxy_pass ​http://backend_host; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection “upgrade”; proxy_read_timeout 86400; } You can also check the nginx changelog and the WebSocket proxying documentation.

Redirect to other domain but keep typed domain

It is possible to get it done via mod_rewrite but make sure mod_proxy is enabled in your Apache’s httpd.conf. Once that is done enable mod_rewrite and .htaccess through httpd.conf and then put this code in your .htaccess under DOCUMENT_ROOT directory: Options +FollowSymLinks -MultiViews RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} ^(www\.)?mydomain\.be$ [NC] RewriteRule ^ http://www.mydomain.nl%{REQUEST_URI} [L,NE,P] … Read more