Today I would like to put the exercise on the server to see, but live and die do not display pictures, now the solution to record:
First, record the following nginx commands:
Start Nginx //Run Nginxnginx-s stop// stop nginxnginx-s Reload //Reload the configuration file (such as after modifying the configuration file, can be reloaded by this command) Nginx-s quit< c3/>//exit Nginxnginx-v //Can be checked Nginx version
Then modify the nginx.conf file in the/usr/local/nginx/conf directory, plus this paragraph:
Location ~* ^.+\. (jpg|jpeg|gif|png|bmp) $ { access_log off; root html; Expires 30d; break; }
We're going to write the site directory behind root.
Finally, the image folder and image authorization, to give all users to view permissions:
chmod 774./images
Finally, use the command above to reload the configuration:
Nginx-s Reload
OK, now it's time to show the picture. (In fact, I think the main problem is the authority, the middle of the code seems to be what background images can not be used when ... )
The above describes the Nginx static website can not display the picture problem, including the content, I hope that the PHP tutorial interested in a friend helpful.