1

I have made some changes to my Ubuntu server running Django with Apache. I modified some HTML, JS and CSS files, but nothing has changed.

Things I have tried:

-Clearing browser cache

-Renaming files to try and circumvent cache.

-Ran manage.py collectstatic

-Restarted Apache

-Rebooted server

I was under the impression that changes to HTML files were reflected immediately in Django, so I am really baffled as to how it could still be serving the old version of the file. I have already checked that there are no duplicated files.

I must be forgetting something. Any ideas, anyone?

user2905256
  • 145
  • 2
  • 12
  • Have you restarted `uwsgi`? – Devang Padhiyar Mar 29 '19 at 04:10
  • this is simple just go to path of wsgi.py and execute touch wsgi.py – Pavan Kumar T S Mar 29 '19 at 05:53
  • what app server are you using for django? uwsgi or gunicorn? in both cases, restart it (e.g. if you're using `systemd`: `sudo service restart`) – dirkgroten Mar 29 '19 at 11:43
  • @dirkgroten @Pavan @Devang I am using uwsgi. Touching the file did not fix it. Should there be a uwsgi service? I ran `sudo service --status-all` and didn't see anything about uwsgi. – user2905256 Mar 29 '19 at 20:31
  • Maybe this [answer](https://serverfault.com/questions/411362/how-do-i-make-uwsgi-restart-when-a-python-script-is-modified) helps. How do you start uwsgi in the first place? – dirkgroten Mar 29 '19 at 20:53
  • 1
    @dirkgroten I believe it starts with Apache when the server boots. If restarting uwsgi was the solution, wouldn't rebooting the server fix it as well? I don't remember having to do anything other than restarting apache in the past but it has been a while since I have had to make changes to the server. – user2905256 Mar 29 '19 at 22:14

0 Answers0