注意しておきたいこと
- mod wsgiのインストールはapt getではなくpipを使う
- mod wsgiのpythonは1つしか指定できない
- apt getのときだけ?
- installするときにpythonのバージョンを指定
- 特にバージョンを指定しないとsystemのバージョンとなる(2系)
pythonを準備
- enable-sharedしてpyenvでpythonをinstallする
- enable-sharedしてpythonを入れないと下記のエラーになる
- エラー
- undefined symbol: forkpty
- 解決法
mod_wsgiをinstall
- mod_wsgi、mod_wsgi-httpdをinstall
- UbuntuでPython3.4 + mod_wsgi + mysql5を使うときの注意点 | Res-Log
- AssertionError using Apache2 and libapache2-mod-wsgi-py3 on Ubuntu 14.04 (Python 3.4) - Ask Ubuntu
Unable to connect to WSGI daemon process のエラー
No such file or directory: [client 192.168.0.2:55585] mod_wsgi (pid=2249) : Unable to connect to WSGI daemon process 'women' on '/etc/apache2/logs/wsgi.2246.0.1.sock' as user with uid=33.
- 解決法
- error: no such file or directory: mod_wsgi: Unable to connect to WSGI daemon process ... - Google グループ
- 「WSGISocketPrefix /var/run/apache2/wsgi」を加える
- error: no such file or directory: mod_wsgi: Unable to connect to WSGI daemon process ... - Google グループ
これでmod_wsgiを使うことができた。