I set up django project on ubuntu 18.04 and apache2 but there is a problem. Media files don't save. When I try to upload file using django-filer I get 500 internal server error(I wrote simple plugin with charfield and filefield - the same happens) independently from DEBUG=True/False setting. I uploaded few files using manage.py runserver and this works great - I can even use these files in production but an attempt to upload any new one cause error settings.py:
MEDIA_URL = '/media/'
MEDIA_ROOT = '/mysite/public/media/'
STATIC_URL = '/static/'
STATIC_ROOT = '/mysite/public/static/'
STATICFILES_DIRS = [os.path.join(BASE_DIR,'static')]
apache configuration:
alias /static /mysite/public/static
<Directory /mysite/public/static>
Require all granted
</Directory>
alias /media /mysite/public/media
<Directory /mysite/public/media>
Require all granted
</Directory>
<Directory /mysite/src/proj>
<Files wsgi.py>
Require all granted
</Files>
</Directory>
WSGIDaemonProcess mysite python-home=/mysite/venv python-path=/mysite/src/
WSGIProcessGroup mysite
WSGIScriptAlias / /mysite/src/proj/wsgi.py
In conclusion: manage.py runserver works great. On production server I can manage files which were uploaded earlier but an attempt to upload a new one cause error 500.
DEBUG=True
in production can't you get the error from it?