我的烧瓶代码在应用程序类型
/some code//
if __name__ == '__main__':
app.run()
我已经在路径/var/www/AutomateTests
中设置了我的wsgi文件
#!/usr/bin/python3.6
import sys
import logging
sys.path.insert(0,"/var/www/AutomateTests/")
from app import app as application
application.root_path = '/var/www/AutomateTests/'
我有/etc/apache2/sites-available/automate_tests.conf
VirtualHost *:80>
ServerName htstool.arubanetworks.com
ServerAdmin admin@htstool.arubanetworks.com
ServerAlias htstool.arubanetworks.com
ErrorLog /var/log/apache2/hts-error.log
CustomLog /var/log/apache2/htstool-access.log combined
WSGIDaemonProcess AutomateTests user=www-data group=www-data threads=5
WSGIScriptAlias / /var/www/AutomateTests/automate_tests.wsgi
<Directory /var/www/AutomateTests>
WSGIProcessGroup AutomateTests
WSGIApplicationGroup %{GLOBAL}
Order allow,deny
Allow from all
</Directory>
LogLevel info
</VirtualHost>
我把一切都安排妥当了,我已经在这个问题上纠缠了好几个星期了。有人能帮我把它放到服务器上吗。有没有一步我错过了。你知道吗
我设置相同的错误,我的端口正在使用,虽然它不是! 看到我的错误了吗
但正如你所看到的,我的端口是空的,没有被使用。我使用命令netstat -ntlp
检查
see my ports are listening and not established
有人能帮帮我吗。我被卡住了,在完全检查之前,没有将它标记为已回答。我试过所有的答案,但都不管用!请耐心点,让别人帮我,因为我自己做不到。你知道吗
我的服务器运行正常,我看到了默认的ubuntu页面,这意味着我的apache2服务器运行正常,所以无论是配置还是端口都有问题
当我看到这个的时候,我想到两件事。你知道吗
注意该命令的第一行输出:
(Not all processes could be identified, non-owned process info will not be shown, you would have to be root to see it all.)
Apache以提升的权限运行,因此您需要以root身份运行(将sudo
附加到命令的开头)以查看其端口绑定。我敢打赌这就是问题所在。修复后,您可能会遇到以下问题:还有一件事,与脚本没有特别的关系,但是看起来你在屏幕截图中使用了awsec2(如果我错了,请纠正我)。如果希望能够从公共internet访问端口80上的实例,则需要确保allow it in the Security Group。我知道这会给第一次使用awsec2的人带来一些困惑,当然对我来说也是。你知道吗
希望这有帮助!你知道吗
相关问题 更多 >
编程相关推荐