February 2018
Beginner to intermediate
348 pages
9h 40m
English
Character strings that you use as directive values can be written in three forms. First, you may enter the value without quotes:
root /home/example.com/www;
However, if you want to use a particular character, such as a blank space ( ), a semicolon (;), or a pair of curly braces ({ }), you will need to either prefix said character with a backslash (\), or enclose the entire value in single or double quotes:
root '/home/example.com/my web pages';
Nginx makes no difference whether you use single or double quotes. Note that variables inserted in strings within quotes will be expanded normally, unless you prefix the $ character with a backslash (\).