3

I'm working on getting Apache to serve up static files for a Django project. My VirtualHost has:

Alias /static/ /home/jonathan/pragmatometer/static/ ProxyPass / http://localhost:8000/ ProxyPassReverse / http://localhost:8000/ 

But requests for /static/css/style.css are being served by the Django process, not a static pull to /home/jonathan/pragmatometer/static/css/style.css.

What can I do so that the Alias trumps the proxy? I can try to cobble together several ProxyPass / ProxyPassReverse definitions for /load/, /save/, /admin/, but that has got to be the wrong way.

So what's the right way?

1 Answer 1

9

Yes, ProxyPass wins in that case. The way to avoid this problem is:

ProxyPass /static/ ! ProxyPass / http://localhost:8000/ ProxyPassReverse / http://localhost:8000/ 

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.