0
私はapache2の後ろにuwsgiを設定することに問題があります。 "!こんにちは" uwsgiとapache2の問題
$ cd ~/myapp
$ uwsgi --socket 0.0.0.0:8081 --protocol=http -w wsgi
私はhttp://example.com:8081を参照して見ることができます
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 12.04.5 LTS
Release: 12.04
Codename: precise
$ apache2 -v
Server version: Apache/2.4.20 (Ubuntu)
$ uwsgi --version
2.0.14
$ cat /etc/init/uwsgi.conf
description "uWSGI Emperor"
start on runlevel [2345]
stop on runlevel [!2345]
respawn
exec /usr/local/bin/uwsgi --emperor /etc/uwsgi/vassals/ --logto /var/log/uwsgi.log
$ python --version
Python 2.7.3
$ cat ~/myapp/wsgi.py
def application(environ, start_response):
start_response('200 OK', [('Content-Type', 'text/html')])
return ["<h1 style='color:blue'>Hello There!</h1>"]
と
付: ここに私のシステムですテストページ。だから、私はuwsgiが正しく動作していると仮定しています。しかし、私はapache2の後ろuwsgiを置きたいが、私は$ a2enmod uwsgi
と再起動apache2のを試してみてくださいwhenenver私は私が意味することはできませんエラーが出る:
$ service apache2 restart
* Restarting Apache httpd web server apache2 [fail]
* The apache2 configtest failed.
Output of config test was:
apache2: Syntax error on line 140 of /etc/apache2/apache2.conf:
Syntax error on line 1 of /etc/apache2/mods-enabled/uwsgi.load:
Cannot load /usr/lib/apache2/modules/mod_uwsgi.so into server:
/usr/lib/apache2/modules/mod_uwsgi.so: cannot open shared object file:
No such file or directory
Action 'configtest' failed.
The Apache error log may have more information.
を誰もがこれで私を助けることができます?私は何時間も検索しましたが、これで私を助けてくれるaynthingを見つけることはできません。
ありがとうございます。
PS:ああ、Apacheのエラーログに関連する情報が見つかりませんでした。