Nginx try_files with @location and php app + java app + static files. Help needed

view story

http://serverfault.com – I need some help with nginx's try_files directive. I have a web directory with the following layout: /var/www/www.domain.com/htdocs/forum <-- php stuff /var/www/www.domain.com/htdocs/static <-- static stuff /var/www/www.domain.com/htdocs/images <-- static stuff /var/www/www.domain.com/htdocs/someMore <-- static stuff Furthermore, I also have a java web application which "sits" at the root of the site. location / { proxy_pass http://localhost:8080/myApp/; proxy_set_header Host $host; proxy_set_heade (HowTos)