How to solve the problem of picture access after Nginx picture server configuration
In this article, Xiaobian introduces in detail how to solve the problem of picture access after Nginx picture server configuration. The content is detailed, the steps are clear, and the details are handled properly. I hope that this article "how to solve the problem of picture access after Nginx picture server configuration" can help you solve your doubts.
My misconfiguration is:
Server file root address:
Want to enter this address through the browser to access the picture:
However, you will find that the file cannot be found because the root path is misconfigured. Let's take a look at the principle of root path:
Root configuration means that the directory configured by root will be followed by URL to form the corresponding file path.
It means that the address we entered in the browser actually accesses
/ home/ftpuser/images/images/~~~
Will spell the / images after our location to the actual access path.
There are two ways to deal with it:
1. The solution is to remove the images after root, as follows:
In this way, the image can be accessed at the address before it is entered in the browser.
2. The second solution is to configure the access path using alias
After reading this, the article "how to solve the problem of picture access after Nginx picture server configuration" has been introduced. If you want to master the knowledge points of this article, you still need to practice and use it yourself to understand it. If you want to know more about related articles, welcome to follow the industry information channel.