Sunday, March 21, 2021

Configure Django with Apache

Python2

sudo apt-get install python-pip apache2 libapache2-mod-wsgi

Python3

sudo apt-get install python3-pip apache2 libapache2-mod-wsgi-py3 

<VirtualHost *:80>

        ServerName abc.com

        ServerAlias abc.com

        Alias /static /var/www/api/env/lib/python3.6/site-packages/django/contrib/admin/static

        <Directory /var/www/api/folder/folder >

                <Files wsgi.py>

                        Require all granted

                </Files>

        </Directory>


        WSGIDaemonProcess tigergourd python-path=/var/www/folder/folder python-home=/var/www/api/env

        WSGIProcessGroup groupname

        WSGIScriptAlias / /var/www/api/folder/folder/wsgi.py


</VirtualHost>


-- In case error when run manage.py-----


mysql.connector.errors.NotSupportedError: Authentication plugin 'caching_sha2_password' is not supported

pip install mysql-connector-python




Running setup.py clean for Pillow

  Building wheel for pycrypto 

  

  pip uninstall pycrypto

  pip install pycryptodome


1 comment:

  1. Guest blogging is crucial for SEO that's why this post Crack Pro Software provides a free best blog and article submission sites.

    ATVC Crack
    Silhouette Studio Crack
    Hide-My-Ip Crack
    Reason Crack
    VMare Work station Crack
    Sandboxie Crack
    https://crackpropatch.co/nicepage-crack/

    ReplyDelete