我想在本地主機上啓動HTTPS服務器,但出現錯誤。我以管理員身份打開了cmd。啓動HTTP/HTTPS服務器,python -m SimpleHTTPServer
C:\Windows\system32>python -m SimpleHTTPServer
Traceback (most recent call last):
File "C:\Python27\lib\runpy.py", line 162, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "C:\Python27\lib\runpy.py", line 72, in _run_code
exec code in run_globals
File "C:\Python27\lib\SimpleHTTPServer.py", line 224, in <module>
test()
File "C:\Python27\lib\SimpleHTTPServer.py", line 220, in test
BaseHTTPServer.test(HandlerClass, ServerClass)
File "C:\Python27\lib\BaseHTTPServer.py", line 595, in test
httpd = ServerClass(server_address, HandlerClass)
File "C:\Python27\lib\SocketServer.py", line 419, in __init__
self.server_bind()
File "C:\Python27\lib\BaseHTTPServer.py", line 108, in server_bind
SocketServer.TCPServer.server_bind(self)
File "C:\Python27\lib\SocketServer.py", line 430, in server_bind
self.socket.bind(self.server_address)
File "C:\Python27\lib\socket.py", line 224, in meth
return getattr(self._sock,name)(*args)
socket.error: [Errno 10013] An attempt was made to access a socket in a way forb
idden by its access permissions
你看過這個嗎? Google上有很多結果。我不會因爲重複而關閉,因爲我不知道做出判斷是否足夠,但我希望您至少在提出問題時指出它們不適用。 – Veedrac 2014-09-21 05:05:11
是的,看到答案討論嘗試telnet,我得到以下錯誤,C:\ WINDOWS \ SYSTEM32> telnet 127.0.0.1 80 'telnet'不被識別爲內部或外部命令, 可操作的程序或批處理文件。也從正常的管理員帳戶更改爲同一個erorr,同時閱讀,如果有些工作。 – garg10may 2014-09-21 05:08:53