所以我使用python的bottle模块来监听我服务器上的请求。我已经在本地完成了所有测试,现在已经到了部署的时间,我无法让它在我的服务器上运行。
from bottle import route, get, post, request, Bottle, run, template
@route('/Request/<UniqueID>') #Build Temporary Webpage
def login_form(UniqueID):
    return '''<form method="POST" action="/SLR_Creation">
                ID: <input name="UID" type="text" value="''' +UniqueID+ '''" /><br />
                Scale: <input name="Scale" type="text" value="10000"/><br />
                <input type="submit" value="CLick here to create report"/>
              </form>'''
@route('/<UniqueID>', method='POST') # Return
def PHPH_Script(UniqueID):
     # Big long script to create a report
     return '''<p>The report has been created. Click this button to access it.<br /></p>
            <form action="''' + WebLocation +'''.html">
                <input type="submit" value="CLick here to access report">
            </form>'''    
# Create and Run Page
#run(host='localhost', port=8080)
run(host='12.34.255.89', port=80) # This is not my actually IP Address.
现在最后一行代码一直给我一个错误:错误:[Errno 10049]请求的地址在其上下文中无效。现在,如果我使用注释掉的行,它就像一个魅力。
我知道我的 IP 是正确的并且端口是开放的,所以有人知道我的问题是什么吗?