Nginx not picking up site in sites-enabled?

后端 未结 3 2002
半阙折子戏
半阙折子戏 2021-01-29 23:05

After over 10 hours of research I have not figured out why this doesn\'t work! I am trying to move my localhost to my sites-enabled folder which is in /etc/nginx/sites-enabled/d

3条回答
  •  旧巷少年郎
    2021-01-29 23:11

    Include sites-available/default in sites-enabled/default. It requires only one line.

    In sites-enabled/default (new config version?):

    It seems that the include path is relative to the file that included it

    include sites-available/default;
    

    See the include documentation.


    I believe that certain versions of nginx allows including/linking to other files purely by having a single line with the relative path to the included file. (At least that's what it looked like in some "inherited" config files I've been using, until a new nginx version broke them.)

    In sites-enabled/default (old config version?):

    It seems that the include path is relative to the current file

    ../sites-available/default
    

提交回复
热议问题