1

how can I force ProxyPass / ProxyPassReverse NOT to pass a request if the client provides a certain port?

The following passes EVERY request made to the machine correctly:

<VirtualHost _default_:443>
  SSLProxyEngine on
  ProxyPass / http://a.b.c.d:9000/
  ProxyPassReverse / http://a.b.c.d:9000/

Now I do not want to pass requests coming in for port 8080:

http://a.b.c.d:8080 should not be passed.

Is this possible?

recalcitrant
  • 153
  • 1
  • 3

1 Answers1

0

Your could try something like a catch all vhost after your :443 vhost declaration:

<VirtualHost _default_:*>
DocumentRoot /www/default
...
</VirtualHost>

Then use AliasMatch or a RewriteRule to rewrite any request that hits this vhost to an information page or whatever you want. Here's a great reference page on vhost matching precedence: http://httpd.apache.org/docs/2.2/vhosts/details.html

iainlbc
  • 2,694
  • 19
  • 19