10. Static Resources - Nginx Configuration
Contents
With the Nginx server, we can increase the speed of loading static resources.
Install Nginx
Update nginx.conf file
Update the listening port from 80 to 8089 and add the location directive into the server directive scope in the nginx-1.15.12\conf\nginx.conf file:
|
|
Test Configuration Syntax and Start Nginx
Run command prompt as Adnimistrator:
|
|
Access an Uploaded Image
We can get the avatar path from the database:
Try it in browser:
|
|
Update the profile.ftl Template in Controller Module
Copy and paste the following content into the profile.ftl template under the controller/src/main/resources/templates/user directory:
|
|
Try the Effect
Login and visit the following url:
|
|
Author Dong Chen
LastMod Fri May 3 2019