-
Notifications
You must be signed in to change notification settings - Fork 1
Server Troubleshooting
Luis David Licea Torres edited this page Apr 26, 2022
·
1 revision
These guidelines are useful for troubleshooting the server.
Restart the server every time after using pip3 to install a package.
sudo service apache2 restart
Change the ownership of the files that have been pulled.
sudo chown -R www-data .
This command recursively gives ownership to the Apache www-data
user on the current directory and sub-directories.
The following commands make and apply database migrations.
python3 manage.py makemigrations
python3 manage.py migrate
Additionally, collect any static files such as images and CSS files that may have been pulled.
python3 manage.py collectstatic
Setup env variables such as passwords, emails, and keys by adding them to /etc/apache2/envvar
.
export EMAIL="[email protected]"
export PASS="secret-password"
export KEY="secret-key"
Whenever server errors occur, try checking the logs on /var/log/apache2/<domain>.log
.