The server environment is the LNMP environment,
the computer is the LAMP environment,
The picture directory is a sibling directory of public;
The image path can be displayed on the local machine, but when placed on the server, external access cannot display the image, unless I set the default access path of nginx to the public superior directory, but in this case, the css style path is Something went wrong;
The path of the picture is www.xxx.com/../uploads/asdads.jpg
or something like this.
There is no problem in the LAMP environment, but it will not work in the server. What is the problem?
I suspect that nginx settings are missing. So I wanted to ask.
The path is fine on this machine. I found that when the browser accesses the server, it seems to ignore ../. I have placed the save folder in the public directory.
Based on your description, I guess there is something wrong with the path settings. You can use the development mode in the browser to see where the paths of the images and Js point to respectively, and whether they are the same as you expected.
First check whether the uploads directory has read and write permissions. Secondly, if it is ignored, try the absolute path?
Confirm whether the file name is correct
Public files can directly specify the absolute path in nginx