TandoorRecipes / recipes

Application for managing recipes, planning meals, building shopping lists and much much more!
https://docs.tandoor.dev
Other
5.3k stars 555 forks source link

nginx configuration #2455

Open jobidon opened 1 year ago

jobidon commented 1 year ago

Documentation link

https://docs.tandoor.dev/install/manual/#nginx

Affected section

Installation

Other

No response

Issue description

The content of the nginx.conf file should be updated to include a trailing slash for the static and media directory location. Failure to do so prevents nginx from locating all static files and media files. The corrected lines should be: alias /var/www/recipes/staticfiles/; and alias /var/www/recipes/mediafiles/; Notice the character immediately before the semi-colon

vabene1111 commented 1 year ago

interesting, the current nginx conf has worked for thousands of deployments for years now, how do you come to the conclusion that it does not work without the slash?

smilerz commented 1 year ago

interesting, the current nginx conf has worked for thousands of deployments for years now, how do you come to the conclusion that it does not work without the slash?

I think he is referring to the documentation at https://docs.tandoor.dev/install/manual/ The example nginx config doesn't match the current Recipes.conf that ships with Tandoor.

jobidon commented 1 year ago

Indeed, that is correct. I did the manual install and configured the system just like the docs described. Might just be my config, but when I tried it without the slash, nginx was complaining that :

[error] 84522#84522: *32 open() "/var/www/recipes/staticfilesassets/favicon
-32x32.b7d9707eac91.png" failed (2: No such file or directory),
...

and adding the slash in the config simply fixed the issue.

mmelzian commented 1 year ago

I had exactly the same problem. Did the manual installation and the images (mediafiles) were not loading. Static files worked. I added the slash for locations media and static and viola: I can see my recipe image