First of all, set up Django with apache with this https://gulshan1996.blogspot.com/2020/08/set-up-django-with-apache.html If your JWT auth is not working on apache server, This is because of Apache block the header So you have to enable them by, adding this line in apache conf file WSGIPassAuthorization On WSGIScriptAlias / /home/farmafeed/manageFarmafeed/farmafeedProject/wsgi.py <Directory /home/farmafeed/manageFarmafeed> Order allow,deny Allow from all </Directory> Note: /home/farmafeed/manageFarmafeed/farmafeedProject this is my URL Just Add WSGIPassAuthorization On && <Directory /home/farmafeed/manageFarmafeed> Order allow,deny Allow from all </Directory>
adduser username Copy Set and confirm the new user’s password at the prompt. A strong password is highly recommended! Set password prompts: Enter new UNIX password: Retype new UNIX password: passwd: password updated successfully Follow the prompts to set the new user’s information. It is fine to accept the defaults to leave all of this information blank. User information prompts: Changing the user information for username Enter the new value, or press ENTER for the default Full Name []: Room Number []: Work Phone []: Home Phone []: Other []: Is the information correct? [Y/n] Use the usermod command to add the user to the sudo group. usermod -aG sudo username Copy By default, on Ubuntu, members of the sudo group have sudo privileges. Test sudo access on new user account Use the su command to switch to the new user account. su - username Copy As the new user, verify that you can use sudo by prep...
Comments
Post a Comment