$sudo yum install httpd24-devel.x86_64 gcc git
$sudo python3.5 -m pip install mod-wsgi
$ cd ~/django_app
$python manage.py makemigrations
$python manage.py migrate
Note: if you get any errors remove "db.sqlite3" file and execute the above 2 commands
$python manage.py collectstatic
$sudo chown :www-data db.sqlite3
$sudo service apache2 restart
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/3b30b913-c881-451d-a25e-3539eaefa035%40googlegroups.com.
/opt/bin# ./opkg find httpd
/opt/bin#
/opt/bin# ./opkg install apache
Package apache (2.4.37-2) installed in root is up to date.
/opt/bin# ./opkg install gcc
Package gcc (7.4.0-5) installed in root is up to date.
/opt/bin# sudo python3.5 -m pip install mod-wsgi
Collecting mod-wsgi
Using cached mod_wsgi-4.7.1.tar.gz (498 kB)
ERROR: Command errored out with exit status 1:
command: /usr/local/bin/python3.5 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-24inw61_/mod-wsgi/setup.py'"'"'; __file__='"'"'/tmp/pip-install-24inw61_/mod-wsgi/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-install-24inw61_/mod-wsgi/pip-egg-info
cwd: /tmp/pip-install-24inw61_/mod-wsgi/
Complete output (5 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-24inw61_/mod-wsgi/setup.py", line 168, in <module>
'missing Apache httpd server packages.' % APXS)
RuntimeError: The 'apxs' command appears not to be installed or is not executable. Please check the list of prerequisites in the documentation for this package and install any missing Apache httpd server packages.
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/564baec6-a88e-4360-bb13-9518b1f40634%40googlegroups.com.
gunicorn project/wsgi.py:application
[2020-03-04 13:46:26 +0000] [28939] [INFO] Starting gunicorn 19.9.0
[2020-03-04 13:46:26 +0000] [28939] [INFO] Listening at: http://127.0.0.1:8000 (28939)
[2020-03-04 13:46:26 +0000] [28939] [INFO] Using worker: sync
[2020-03-04 13:46:26 +0000] [28950] [INFO] Booting worker with pid: 28950
[2020-03-04 13:46:26 +0000] [28950] [ERROR] Exception in worker process
Traceback (most recent call last):
File "/opt/lib/python2.7/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker
File "/opt/lib/python2.7/site-packages/gunicorn/workers/base.py", line 129, in init_process
File "/opt/lib/python2.7/site-packages/gunicorn/workers/base.py", line 138, in load_wsgi
File "/opt/lib/python2.7/site-packages/gunicorn/app/base.py", line 67, in wsgi
File "/opt/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 52, in load
File "/opt/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 41, in load_wsgiapp
File "/opt/lib/python2.7/site-packages/gunicorn/util.py", line 354, in import_app
ImportError: Failed to find application, did you mean 'project/wsgi:application'?
[2020-03-04 13:46:26 +0000] [28950] [INFO] Worker exiting (pid: 28950)
[2020-03-04 13:46:26 +0000] [28939] [INFO] Shutting down: Master
[2020-03-04 13:46:26 +0000] [28939] [INFO] Reason: Worker failed to boot.
Could anyone tell me how to start correctly the unicorn (integration)?
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/e4404c7e-e6d1-460d-9c22-e4571f1b7528%40googlegroups.com.
gunicorn -w 4 wsgi:application
[2020-03-05 12:55:09 +0000] [29297] [INFO] Starting gunicorn 19.9.0
[2020-03-05 12:55:09 +0000] [29297] [INFO] Listening at: http://127.0.0.1:8000 (29297)
[2020-03-05 12:55:09 +0000] [29297] [INFO] Using worker: sync
[2020-03-05 12:55:09 +0000] [29307] [INFO] Booting worker with pid: 29307
[2020-03-05 12:55:09 +0000] [29307] [ERROR] Exception in worker process
Traceback (most recent call last):
File "/opt/lib/python2.7/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker
File "/opt/lib/python2.7/site-packages/gunicorn/workers/base.py", line 129, in init_process
File "/opt/lib/python2.7/site-packages/gunicorn/workers/base.py", line 138, in load_wsgi
File "/opt/lib/python2.7/site-packages/gunicorn/app/base.py", line 67, in wsgi
File "/opt/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 52, in load
File "/opt/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 41, in
load_wsgiapp
File "/opt/lib/python2.7/site-packages/gunicorn/util.py", line 350, in import_app
File "/var/services/homes/admin/DjangoProject/project/project/wsgi.py", line 12, in <module>
from django.core.wsgi import get_wsgi_application
ImportError: No module named django.core.wsgi
[2020-03-05 12:55:09 +0000] [29307] [INFO] Worker exiting (pid: 29307)
[2020-03-05 12:55:09 +0000] [29308] [INFO] Booting worker with pid: 29308
[2020-03-05 12:55:09 +0000] [29308] [ERROR] Exception in worker process
Traceback (most recent call last):
File "/opt/lib/python2.7/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker
File "/opt/lib/python2.7/site-packages/gunicorn/workers/base.py", line 129, in init_process
File "/opt/lib/python2.7/site-packages/gunicorn/workers/base.py", line 138, in load_wsgi
File "/opt/lib/python2.7/site-packages/gunicorn/app/base.py", line 67, in wsgi
File "/opt/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 52, in load
File "/opt/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 41, in
load_wsgiapp
File "/opt/lib/python2.7/site-packages/gunicorn/util.py", line 350, in import_app
File "/var/services/homes/admin/DjangoProject/project/project/wsgi.py", line 12, in <module>
from django.core.wsgi import get_wsgi_application
ImportError: No module named django.core.wsgi
[2020-03-05 12:55:09 +0000] [29309] [INFO] Booting worker with pid: 29309
[2020-03-05 12:55:09 +0000] [29308] [INFO] Worker exiting (pid: 29308)
[2020-03-05 12:55:09 +0000] [29310] [INFO] Booting worker with pid: 29310
[2020-03-05 12:55:09 +0000] [29309] [ERROR] Exception in worker process
Traceback (most recent call last):
File "/opt/lib/python2.7/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker
File "/opt/lib/python2.7/site-packages/gunicorn/workers/base.py", line 129, in init_process
File "/opt/lib/python2.7/site-packages/gunicorn/workers/base.py", line 138, in load_wsgi
File "/opt/lib/python2.7/site-packages/gunicorn/app/base.py", line 67, in wsgi
File "/opt/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 52, in load
File "/opt/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 41, in
load_wsgiapp
File "/opt/lib/python2.7/site-packages/gunicorn/util.py", line 350, in import_app
File "/var/services/homes/admin/DjangoProject/abrechnung/abrechnung/wsgi.py", line 12, in <module>
from django.core.wsgi import get_wsgi_application
ImportError: No module named django.core.wsgi
[2020-03-05 12:55:09 +0000] [29309] [INFO] Worker exiting (pid: 29309)
[2020-03-05 12:55:09 +0000] [29310] [ERROR] Exception in worker process
Traceback (most recent call last):
File "/opt/lib/python2.7/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker
File "/opt/lib/python2.7/site-packages/gunicorn/workers/base.py", line 129, in init_process
File "/opt/lib/python2.7/site-packages/gunicorn/workers/base.py", line 138, in load_wsgi
File "/opt/lib/python2.7/site-packages/gunicorn/app/base.py", line 67, in wsgi
File "/opt/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 52, in load
File "/opt/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 41, in
load_wsgiapp
File "/opt/lib/python2.7/site-packages/gunicorn/util.py", line 350, in import_app
File "/var/services/homes/admin/DjangoProject/abrechnung/abrechnung/wsgi.py", line 12, in <module>
from django.core.wsgi import get_wsgi_application
ImportError: No module named django.core.wsgi
[2020-03-05 12:55:09 +0000] [29310] [INFO] Worker exiting (pid: 29310)
[2020-03-05 12:55:10 +0000] [29297] [INFO] Shutting down: Master
[2020-03-05 12:55:10 +0000] [29297] [INFO] Reason: Worker failed to boot.
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "project.settings")
application = get_wsgi_application()
gunicorn -w 4 wsgi:application
[... continued ...]
Traceback (most recent call last):
File "/opt/lib/python2.7/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker
File "/opt/lib/python2.7/site-packages/gunicorn/workers/base.py", line 129, in init_process
File "/opt/lib/python2.7/site-packages/gunicorn/workers/base.py", line 138, in load_wsgi
File "/opt/lib/python2.7/site-packages/gunicorn/app/base.py", line 67, in
wsgi
Traceback (most recent call last):
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/d6ab1255-5fc0-4800-b618-555b34848422%40googlegroups.com.
python -c "import django.core.wsgi" && echo "Yup, works!"
Traceback (most recent call last):
File "<string>", line 1, in <module>
ImportError: No module named django.core.wsgi
python3 manage.py runserver 0:8000
Watching for file changes with StatReloader
Performing system checks...
System check identified no issues (0 silenced).
March 05, 2020 - 14:42:06
Django version 3.0.3, using settings 'project.settings'
Starting development server at http://0:8000/
Quit the server with CONTROL-C.
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/645cfdfa-1861-4ac8-97bf-c3be4c273196%40googlegroups.com.
~/.local/bin$ ./pip3 install gunicorn
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: gunicorn in /volume1/homes/admin/.local/lib/python3.8/site-packages (20.0.4)
Requirement already satisfied: setuptools>=3.0 in /volume1/homes/admin/.local/lib/python3.8/site-packages (from gunicorn) (45.2.0)
~/.local/bin$ ./pip3.5 install gunicorn
Defaulting to user installation because normal site-packages is not writeable
Collecting gunicorn
Using cached gunicorn-20.0.4-py2.py3-none-any.whl (77 kB)
Requirement already satisfied: setuptools>=3.0 in /volume1/@appstore/py3k/usr/local/lib/python3.5/site-packages (from gunicorn) (41.0.1)
Installing collected packages: gunicorn
WARNING: The script gunicorn is installed in '/var/services/homes/admin/.local/bin' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed gunicorn-20.0.4
./pip3.8 install gunicorn
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: gunicorn in /volume1/homes/admin/.local/lib/python3.8/site-packages (20.0.4)
Requirement already satisfied: setuptools>=3.0 in /volume1/homes/admin/.local/lib/python3.8/site-packages (from gunicorn) (45.2.0)
./pip install gunicorn
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: gunicorn in /volume1/homes/admin/.local/lib/python3.8/site-packages (20.0.4)
Requirement already satisfied: setuptools>=3.0 in /volume1/homes/admin/.local/lib/python3.8/site-packages (from gunicorn) (45.2.0)
/volume1/@appstore/py3k/usr/local/bin$ ./pip install gunicorn
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: gunicorn in /volume1/homes/admin/.local/lib/python3.5/site-packages (20.0.4)
Requirement already satisfied: setuptools>=3.0 in /volume1/@appstore/py3k/usr/local/lib/python3.5/site-packages (from gunicorn) (41.0.1)
/usr/bin$ ./pip install gunicorn
/usr/local/lib/python2.7/site-packages/cffi/model.py:526: UserWarning: 'point_conversion_form_t' has no values explicitly defined; next version will refuse to guess which integer type it is meant to be (unsigned/signed, int/long)
% self._get_c_name())
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Defaulting to user installation because normal site-packages is not writeable
Collecting
gunicorn
Downloading gunicorn-19.10.0-py2.py3-none-any.whl (113 kB)
|████████████████████████████████| 113 kB 1.4 MB/s
Installing collected packages: gunicorn
ERROR: Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/usr/local/lib/python2.7/site-packages/gunicorn-19.10.0.dist-info'
Check the permissions.
/usr/bin# ./pip install gunicorn
/usr/local/lib/python2.7/site-packages/cffi/model.py:526: UserWarning: 'point_conversion_form_t' has no values explicitly defined; next version will refuse to guess which integer type it is meant to be (unsigned/signed, int/long)
% self._get_c_name())
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Collecting gunicorn
Downloading gunicorn-19.10.0-py2.py3-none-any.whl (113 kB)
|████████████████████████████████| 113 kB 1.4 MB/s
Installing collected packages: gunicorn
Successfully installed gunicorn-19.10.0
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/30b9b540-6224-4906-98f1-f0a3ff0ebb01%40googlegroups.com.
gunicorn -w 4 wsgi:application
[2020-03-05 15:55:51 +0000] [4472] [INFO] Starting gunicorn 19.9.0
[2020-03-05 15:55:51 +0000] [4472] [INFO] Listening at: http://127.0.0.1:8000 (4472)
[2020-03-05 15:55:51 +0000] [4472] [INFO] Using worker: sync
[2020-03-05 15:55:51 +0000] [4483] [INFO] Booting worker with pid: 4483
[2020-03-05 15:55:51 +0000] [4483] [ERROR] Exception in worker process
Traceback (most recent call last):
File "/opt/lib/python2.7/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker
File "/opt/lib/python2.7/site-packages/gunicorn/workers/base.py", line 129, in init_process
File "/opt/lib/python2.7/site-packages/gunicorn/workers/base.py", line 138, in load_wsgi
File "/opt/lib/python2.7/site-packages/gunicorn/app/base.py", line 67, in wsgi
File "/opt/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 52, in load
File "/opt/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 41, in load_wsgiapp
File "/opt/lib/python2.7/site-packages/gunicorn/util.py", line 350, in import_app
ImportError: No module named wsgi
[2020-03-05 15:55:51 +0000] [4483] [INFO] Worker exiting (pid: 4483)
[2020-03-05 15:55:51 +0000] [4484] [INFO] Booting worker with pid: 4484
[2020-03-05 15:55:51 +0000] [4484] [ERROR] Exception in worker process
Traceback (most recent call last):
File "/opt/lib/python2.7/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker
File "/opt/lib/python2.7/site-packages/gunicorn/workers/base.py", line 129, in init_process
File "/opt/lib/python2.7/site-packages/gunicorn/workers/base.py", line 138, in load_wsgi
File "/opt/lib/python2.7/site-packages/gunicorn/app/base.py", line 67, in wsgi
File "/opt/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 52, in load
File "/opt/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 41, in load_wsgiapp
File "/opt/lib/python2.7/site-packages/gunicorn/util.py", line 350, in import_app
ImportError: No module named wsgi
[2020-03-05 15:55:51 +0000] [4484] [INFO] Worker exiting (pid: 4484)
[2020-03-05 15:55:51 +0000] [4486] [INFO] Booting worker with pid: 4486
[2020-03-05 15:55:51 +0000] [4486] [ERROR] Exception in worker process
Traceback (most recent call last):
File "/opt/lib/python2.7/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker
File "/opt/lib/python2.7/site-packages/gunicorn/workers/base.py", line 129, in init_process
File "/opt/lib/python2.7/site-packages/gunicorn/workers/base.py", line 138, in load_wsgi
File "/opt/lib/python2.7/site-packages/gunicorn/app/base.py", line 67, in wsgi
File "/opt/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 52, in load
File "/opt/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 41, in load_wsgiapp
File "/opt/lib/python2.7/site-packages/gunicorn/util.py", line 350, in import_app
ImportError: No module named wsgi
[2020-03-05 15:55:51 +0000] [4486] [INFO] Worker exiting (pid: 4486)
[2020-03-05 15:55:51 +0000] [4487] [INFO] Booting worker with pid: 4487
[2020-03-05 15:55:51 +0000] [4487] [ERROR] Exception in worker process
Traceback (most recent call last):
File "/opt/lib/python2.7/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker
File "/opt/lib/python2.7/site-packages/gunicorn/workers/base.py", line 129, in init_process
File "/opt/lib/python2.7/site-packages/gunicorn/workers/base.py", line 138, in load_wsgi
File "/opt/lib/python2.7/site-packages/gunicorn/app/base.py", line 67, in wsgi
File "/opt/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 52, in load
File "/opt/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 41, in load_wsgiapp
File "/opt/lib/python2.7/site-packages/gunicorn/util.py", line 350, in import_app
ImportError: No module named wsgi
[2020-03-05 15:55:51 +0000] [4487] [INFO] Worker exiting (pid: 4487)
[2020-03-05 15:55:51 +0000] [4472] [INFO] Shutting down: Master
[2020-03-05 15:55:51 +0000] [4472] [INFO] Reason: Worker failed to boot.
Is there anything particular hat I have to write into that wsgi.py file?
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/0bfe682d-5dda-4f50-85bc-1239b17a82a3%40googlegroups.com.
Is there anything particular hat I have to write into that wsgi.py file?
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/0bfe682d-5dda-4f50-85bc-1239b17a82a3%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/adbc08e4-4c83-405f-9042-3333d38ba2a5%40googlegroups.com.
When I run ~# python3 -m pip install mod-wsgi
I got the same error message: RuntimeError: The 'apxs' command appears not to be installed or is not executable. Please check the list of prerequisites in the documentation for this package and install any missing Apache httpd server packages.
I installed the Apache HTTP Server 2.4.43 from Synology DSM 6.2.4-25556 Package Center. The apex is found in the system.
~# find / -iname apx*
/volume1/@appstore/Apache2.4/usr/local/bin/apxs
Could you share with me the way you got out from here?
Thanks
Best Regards,
Tony