0

is there a way to proxy URL to another port in apache? For example I would like to (reverse) proxy URL:

http://*.localhost/engine.io/?EIO=2&transport=polling 

from port 80 to port 8080 without changing url:

http://*.localhost:8080/engine.io/?EIO=2&transport=polling 

Thank you!

1 Answer 1

1

In your *.localhost (port 80) vhost, add:

RewriteEngine On RewriteCond %{SERVER_PORT} 80 RewriteCond %{HTTP_HOST} ^(.*)$ RewriteRule ^/engine\.io/$ http://%1:8080/engine.io/?%{QUERY_STRING} [L,P] 
Sign up to request clarification or add additional context in comments.

2 Comments

@kamylko You can't use a wildcard with ServerName, you need ServerAlias. See: httpd.apache.org/docs/2.2/vhosts/name-based.html
I am affraid that these rewrite conditions somehow interfering with zend project .htaccess or something.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.