Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.