开发者

Regex negation - Apache

I'd like to configure my Apache web server to serve everything that begins with "/static/" and anything else should be served by Tomcat.

For example:

  • www.myDomain.com/static/anything should be served by Apache web server

  • www.myDomain.com/notStatic/ should be server by Tomcat

Here is my config file:

<VirtualHost *:80>

ServerName myDomain.com
ServerAlias www.myDomain.com

DocumentRoot /var/www

ProxyPassMatch (?!/static/.*)$ ajp://localhost:8009/$1

</VirtualHost>

But this does not wo开发者_Python百科rk. How should I do this?


i did this by setting nginx for static to work on another ip and setting subdomain static.* to that ip

if you cant do that i would suggest setting up a proxy for both servers (for all traffic on 80 port)

and i dont recommend apache for static content. use nginx/lighttpd

also this should be asked on http://serverfault.com (IMHO)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜