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

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

Setting up an Apache Proxy with Authentication

For the record, this is how I set up apache to be used as a forward-proxy with basic authentication: Open http.conf Uncomment the following LoadModule directives to enable proxy funcionality LoadModule proxy_module modules/mod_proxy.so LoadModule proxy_http_module modules/mod_proxy_http.so Add the following directives to the http.conf to enable authentication ProxyRequests On ProxyVia On <Proxy *> Order deny,allow Allow … Read more

Apache 2.4 + PHP-FPM and Authorization headers

Various Apache modules will strip the Authorization header, usually for “security reasons”. They all have different obscure settings you can tweak to overrule this behaviour, but you’ll need to determine exactly which module is to blame. You can work around this issue by passing the header directly to PHP via the env: SetEnvIf Authorization “(.*)” … 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

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

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.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)