Created
December 3, 2011 15:49
-
-
Save shimondoodkin/1427425 to your computer and use it in GitHub Desktop.
apache nodejs reverse proxy, note this is half tested
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| RewriteEngine On | |
| RewriteRule ^$ http://127.0.0.1:8080/ [P,L] | |
| RewriteCond %{REQUEST_FILENAME} !-f | |
| RewriteCond %{REQUEST_FILENAME} !-d | |
| RewriteRule ^(.*)$ http://127.0.0.1:8080/$1 [P,L] | |
| # see 'proxy|P' (force proxy) http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| connect() | |
| .use(function(req,res,next){ | |
| req.headers.host='212.213.44.179' | |
| req.connection.encrypted = req.headers.https=='on'; # add in apache htaccees: Header set https "%HTTPS" | |
| req.headers.port=80; | |
| next(); | |
| }) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment