Just contact Nginx Server today, found that it is too powerful, but its default directory is not/var/www, used to the Apache server, so want to nginx the root directory to/var/www, try some, can do the following configuration:
1, into the/etc/aginx/conf/vhosts directory, edit the default.conf file under the root of the corresponding value, the site root directory to the directory you want to change.
2, save, use the Kill-hup main process number command smooth restart Nginx server, and then open the browser, you will find 403 Forbidden error, the solution is to add the root directory of the site you want to the WWW:WWW user group.
Nginx server Some of the most common commands:
Nginx-v View version number
Nginx-v view version numbers and related compilation information
Nginx-t detection configuration file is correct
Nginx-t-C Config file directory detects whether the specified profile is correct
Kill-hup main process number smooth reboot Nginx server