Nginx configuration instructions and general problem solving

location

The location. The root configuration

If you request/I /top.gif, the file /data/w3/ I /top.gif will be sent.

location /i/ {
    root /data/w3;
}
Copy the code

The location, alias configuration

Request/I /top.gif and the file /data/w3/top.gif will be sent.

location /i/ {
    alias /data/w3/;
}
Copy the code