nginx Virtual Host Configuration root path error \ n escape

  1. Windows local configuration today yii project, access to 500 errors, see the nginx log and found that the project path is the line change, as shown below


    but I configured in the file is
    server_name localhost;
        listen 8871;
        root 'E:\project\new_year';

    That \ new_year inside the \ n escaped newline character is treated as a.

  2. Then the correct wording should be to avoid the escape, plus \ on OK (good fun ^ _ ^)
    server_name localhost;
        listen 8871;
        root 'E:\project\\new_year';

     

Guess you like

Origin www.cnblogs.com/bneglect/p/12143670.html