eugene
eugene

Reputation: 41665

When do I need to restart nginx

When do I need to restart nginx when using with django and uwsgi?
In case when templates are changed, static files are changed or any other reason?

Upvotes: 3

Views: 1984

Answers (1)

DRC
DRC

Reputation: 5048

Probably only when you change its configuration, if you are referring to when your django code changes you have to restart the uwsgi server, usually "touch"ing the wsgi.py file is enough to instruct the uwsgi server.

Changes in static files don't require the uwsgi restart (because you usually serve them directly with nginx), and if you don't use cached template loaders, but only the default filesystem loader, you don't require the restart when changing a template either.

Note that the cached template loader is usually suggested in production.

Upvotes: 5

Related Questions