简体   繁体   中英

Apache virtual host allow download of jar file

I just made a Virtual host using latest apache in ubuntu.

It finds my index.html and serves it correctly, however when trying to download myfile.jar (also in /var/www) from a remote host it returns 404. Doing this locally works fine...

After lots of googling a mime type was added with the addtype directive however this has not solved the problem for remote hosts.

Please help!

There is no reason why a jar file should not be delivered. It might be served imperfectly if the MIME type is incorrect, but it shouldn't produce a 404.

  • Check whether the JAR file has permissions that allow Apache to access it

  • Check out error.log to see the jar's exact path that Apache failed to find. That will also tell you whether you're maybe operating in the wrong directory.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM