java - web项目下的项目图片要怎么同步到本地提供给nginx作为静态资源访问
PHPz
PHPz 2017-04-18 10:27:26
0
1
346

平时的项目里的图片都是上传到项目下的WebContent下面的,如果想让tomcat专注动态处理,让nginx处理这些图片资源,难道每次项目里上传图片都要做文件操作,把图片同步到类似/use/local/myimgs/这样的路径下吗?

PHPz
PHPz

学习是最好的投资!

reply all(1)
伊谢尔伦

Set the java server upload location, and then nginx points to this location when setting the file path. Then you can use nginx to access these files. nginx will generate the access path based on the file path name, but the format is fixed, so the path can be known when java uploads.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template