0
我在設置apache2後面的uwsgi時遇到問題。 這裏是我的系統: 「你好」uwsgi和apache2問題
$ 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>"]
和
$ cd ~/myapp
$ uwsgi --socket 0.0.0.0:8081 --protocol=http -w wsgi
我可以瀏覽到http://example.com:8081,看到了測試頁面。所以,我假設uwsgi工作正常。不過,我希望把uwsgi背後的Apache2,但whenenver我嘗試
$ a2enmod uwsgi
,並重新啓動的Apache2我得到一個錯誤,我不能做的意義:
$ 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.
誰能幫我這個?我已經搜索了幾個小時,但我無法找到幫助我的合成..
非常感謝您提前。
PS:哦,我在apache錯誤日誌中找不到任何相關信息。