Nginx dynamic and static separation entry case

First, create a data folder under the root directory. There are two folders image and www under the data folder. There are 01.jpg pictures in the image folder (because my remote tool cannot directly drag pictures in, so my 01.jpg
is not a picture, just a normal file), there is an a.htnl file under the www folder, the creation process and content are as follows

Insert picture description here

Turn on tomcat and
Insert picture description here
then configure nginx, enter the conf folder under nginx, the nginx.conf file in the conf folder is the configuration file of nginx

Insert picture description here

The configuration content is as follows. After
Insert picture description here
configuration, remember to save and exit.
Start or reload nginx. By the way, check whether the configuration file has syntax errors.
Insert picture description here
Finally, check the result in the browser.

Insert picture description here
Insert picture description here
In this way, nginx dynamics and statics are combined with the entry case.

Guess you like

Origin blog.csdn.net/qq_44945599/article/details/109285836