The easiest solution (and probably also the best for SEO purposes) is to put your forum on a subdomain, i.e. forum.example.com
If you want everything on the same server it really depends on the rest of your site. Are these real files that you want to serve? Are these files generated by a CMS? Etc.