Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a global proxypass rule in httpd.conf

rules at global level

ProxyPass /test/css http://myserver:7788/test/css
ProxyPassReverse /test/css http://myserver:7788/test/css

and I have a virtual host

Listen localhost:7788
NameVirtualHost localhost:7788
<VirtualHost localhost:7788>
    Alias /test/css/ "C:/jboss/server/default/deploy/test.ear/test-web-app.war/css/"

I would like to disable all global proxypass rules applying in this virtual host? NoProxy doesn't seem to work.

(The reason I would like to do this is I have below global rules which create a 502 proxy loop if applied within this virtual host

#pass all requests to application server
ProxyPass        /test  	http://localhost:8080/test
ProxyPassReverse /test  	http://localhost:8080/test


What I'm trying to do is, serve all static content (like css) using apache, while still proxying all the rest of requests to the application server.

share|improve this question

migrated from Nov 6 '09 at 0:48

This question came from our site for professional and enthusiast programmers.

In the vhost, try something like this

<VirtualHost localhost:7788>
    ProxyPass /test/css !
    Alias /test/css/ "C:/jboss/server/default/deploy/test.ear/test-web-app.war/css/"

The ! says to not proxy this path. Give it a try ... ?

You can also try ProxyRequests Off in your vhost configs.

share|improve this answer

Assuming I understand what you are trying to do, I would get rid of the proxy stuff and use a location or locationmatch block to catch requests for the css. I would place this in the main site config of apache.

I would guess you are either proxying or using a AJP connector to Jboss. Put that after your location block. You could place your proxy pass to jboss here. You would then set the document root of Apache to the top of your war directory. You probably want to keep your alias from your virtualhost also.

After a little futher thought, this may be simpler

put this in the main http.conf outside of any virtualhosts

Alias /test/css/ "C:/jboss/server/default/deploy/test.ear/test-web-app.war/css/" Order allow,deny Allow from all

I assume you are running this all (Jboss, apache) on the same server. Note you could change the path in the directory block to the test-web-app.war directory and add more aliases if you had other things you wanted Apache to serve.

You may want to adjust your Proxypass to Jboss also so you have one for any directories you want JBoss to handle.. It might work just to place it after the above directory block

share|improve this answer
I have tried Alias and it only works if I don't have ProxyPass (global rule for /test) in please. Seems to me that ProxyPass is automatically overriding any Alias rules. I need a global ProxyPass for jboss because, jboss needs to handle all requests for *.seam regardless of the directory. This global ProxyPass(/test) which encompasses the Alias(/test/css) seems to override when put in at the global level. – chinto Nov 11 '09 at 1:52
Perhaps a ProxyPassMatch for the *.seam files would do what you need? – ml Nov 12 '09 at 16:59

Your Answer


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.