3

If you are using fcgiwrap and nginx, if you don't set the root directive, DOCUMENT_ROOT will default to /usr/share/nginx/html/.

In hindsight, it's obvious to me now that there was no way the script could have known the root I wanted without it, but it just didn't occur to me at the time.

Comments
  • 1
    Hey well if it makes you feel better I'm failing to get an letsencrypt cert on a subdomain of mine right now despite having done this 100s of times. :D
  • 0
    @rootshell Oh boy trying to get that going originally was a huge headache. For some reason, during the install it would reset the nginx service file which would show the placeholder site for new installs instead of the sites I expected to run when the service restarted. That cost me a couple days.
  • 0
    I just found out about this when setting up my first Django project. And I've been using nginx for more than a decade now. Since I was just using nginx as a reverse proxy, it didn't occur to me I need to set the root folder for static assets. 😅
Add Comment