2013-06-04 84 views
0

我收到以下消息时,我尝试启动的Apache2:的Apache + WSGI:地址已在使用:make_sock:无法绑定解决

* Restarting web server apache2             
(98)Address already in use: make_sock: could not bind to address 0.0.0.0:2080 
no listening sockets available, shutting down 
Unable to open logs 
Action 'start' failed. 
The Apache error log may have more information. 

uwsgi被侦听该端口:

sudo netstat -ltnp | grep ':2080' 
tcp  0  0 0.0.0.0:2080   0.0.0.0:*    LISTEN 884/uwsgi 

此之前,我手动安装WSGI

sudo apt-get install libapache2-mod-wsgi 

,因为我得到这个消息时,我试图启动Apache:

Syntax error on line 25 of /etc/apache2/sites-enabled/graphite: 
Invalid command 'WSGIDaemonProcess', perhaps misspelled or defined by a module not included in the server configuration 
Action 'configtest' failed. 
The Apache error log may have more information. 
    ...fail! 

杀死进程不起作用,因为它会自动重新启动。我可以用命令

sudo a2dismod wsgi 

但后来我再次获得“无效的命令‘WSGIDaemonProcess’消息禁用它。

的Apache的error.log中不包含的任何信息。

任何想法,如果你有什么可以解决这个因为现在我在一家僵局是一种

回答

1

:?

Invalid command 'WSGIDaemonProcess', perhaps misspelled or defined by a module not included in the server configuration Action 'configtest' failed. 

那么这意味着你没有在Apache中启用mod_wsgi模块,所以它没有加载。

,否则,你运行的是Apache的古老版本1.3,虽然这是不认为你甚至可以得到mod_wsgi的二进制包这样一个旧版本的Apache现在极不可能的。

至于端口使用情况,你显然不能Apache和uWSGI使用同一个,所以你需要把它们设置了不同的端口有。

相关问题