diff options
author | Yongqin Liu <yongqin.liu@linaro.org> | 2020-02-27 20:21:11 +0800 |
---|---|---|
committer | Yongqin Liu <yongqin.liu@linaro.org> | 2020-02-27 20:21:11 +0800 |
commit | 771dd673bda2cf9edb3a6e5fb3ce9ae148120574 (patch) | |
tree | 528d8cc0abafe1b1b3b8be259945f1785db93bdb | |
parent | 9bbbdeeb5cc7b396660a1892d105c371278c5c3d (diff) |
lkft: some change and instructions on deployment with apache2
Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>
-rw-r--r-- | apache/lkft-report.conf | 49 | ||||
-rwxr-xr-x | deploy.sh | 2 | ||||
-rw-r--r-- | lcr/settings.py | 1 |
3 files changed, 52 insertions, 0 deletions
diff --git a/apache/lkft-report.conf b/apache/lkft-report.conf new file mode 100644 index 0000000..85207e9 --- /dev/null +++ b/apache/lkft-report.conf @@ -0,0 +1,49 @@ +<VirtualHost *:80> + #My site Name + #ServerName lkft-report.com + + #Demon process for multiple virtual hosts + #WSGIDaemonProcess lkft-report threads=5 + + #Your static files location + #Alias /static/ "/android/django_instances/lcr-report/static/" + #<Location "/media"> + # SetHandler None + #</Location> + #<LocationMatch "\.(jpg|gif|png|js|css)$"> + # SetHandler None + #</LocationMatch> + #<Directory /android/django_instances/lcr-report > + # WSGIProcessGroup lkft-report + # WSGIApplicationGroup %{GLOBAL} + # Order deny,allow + # Allow from all + #</Directory> + + # AH00526: Syntax error on line 40 of /etc/apache2/sites-enabled/000-default.conf: + # apache2[23283]: WSGIPythonPath cannot occur within <VirtualHost> section + #WSGIPythonHome /android/django_instances/workspace/ + #WSGIPythonPath /android/django_instances/lcr-report + + # https://www.omkarpathak.in/2018/11/11/ubuntu-django-apache/ + # python2: sudo apt-get install python-pip apache2 libapache2-mod-wsgi + # python3: sudo apt-get install python3-pip apache2 libapache2-mod-wsgi-py3 + # sudo chown -R ubuntu:www-data files/ db.sqlite3 logfiles + # sudo service apache2 restart + # See "systemctl status apache2.service" and "journalctl -xe" for details. + # tail -f /var/log/apache2/error.log + WSGIDaemonProcess lkft-report python-home=/android/django_instances/workspace/ python-path=/android/django_instances/lcr-report + WSGIProcessGroup lkft-report + WSGIScriptAlias / /android/django_instances/lcr-report/lcr/wsgi.py + <Directory /android/django_instances/lcr-report/lcr> + <Files wsgi.py> + Require all granted + </Files> + </Directory> + + Alias /static /android/django_instances/lcr-report/static + <Directory /android/django_instances/lcr-report/static> + Require all granted + </Directory> + +</VirtualHost> @@ -76,6 +76,8 @@ else fi cd lcr-report +mkdir -p datafiles/logfiles/ +sudo chown -R :www-data datafiles rm -fr db.sqlite3 python manage.py migrate python manage.py createsuperuser diff --git a/lcr/settings.py b/lcr/settings.py index 0d4ca9e..6ab9822 100644 --- a/lcr/settings.py +++ b/lcr/settings.py @@ -112,6 +112,7 @@ DEBUG = True ALLOWED_HOSTS = [u'127.0.0.1', u'192.168.0.104', u'192.168.31.221', + u'213.146.155.43', u'android.linaro.org', u'192.168.0.106'] |