When you recently deployed the Log Analysis tool Awstats on Nginx, when configuring Awstats analysis results for web browsing, Analysis results page access is always 404. Later looked at some data, found that the use of root and alias difference did not understand the cause, here specifically will be the difference between the two detailed way, for everyone to learn reference.
Nginx actually does not have the virtual host this argument, because it originally is completely according to the catalog to design and work. If you have to install a virtual directory for Nginx, then only the alias is more "like".
What is the difference between the alias label and the root label?
1, the alias followed by the specified directory is accurate, and the end must be added "/", otherwise the file could not be found
location/c/{
alias/a/
}
This column more highlights: http://www.bianceng.cn/Servers/web/
If you visit a site http://location/c access is the site information in the/a/directory.
2, Root followed by the specified directory is the parent directory, and the parent directory to contain and location after the name of the specified directory, the end of the "/" plus does not matter.
location/c/{
root/a/
}
If you visit a site http://location/c access is the site information in the/A/C directory.
3. In general, it is a good habit to configure the alias in Location/other in Location/in the configuration of root.
Other messy things here is not nonsense, as long as the understanding of this point, the day-to-day operation of a few to understand.