简体   繁体   English

python -m SimpleHTTPServer-侦听0.0.0.0:8000但“找不到页面”

[英]python -m SimpleHTTPServer - Listening on 0.0.0.0:8000 but “Page Not Found”

When I use this code 当我使用此代码

python -m SimpleHTTPServer

it is showing 它显示

Serving HTTP on 0.0.0.0 port 8000 ...

But page is not displaying. 但是页面没有显示。

When I used the port 80 当我使用端口80

python -m SimpleHTTPServer 80

it is working. 这是工作。

How to enable the port 8000 如何启用端口8000

Anyone can help me with solution to this. 任何人都可以帮助我解决这个问题。

When I am using my own IP its working but in ssh connection port 8000 is not working only port 80 is working 当我使用自己的IP时,它可以工作,但是在ssh连接中,端口8000不起作用,只有端口80在起作用

http://0.0.0.0:8000

Should do the work. 应该做的工作。

The default port when browsing HTTP from a Web-Browser is 80. If you want to browser from a different port you have to specify it after the site address with leading colon. 从Web浏览器浏览HTTP时的默认端口为80。如果要从其他端口浏览,则必须在站点地址后加冒号开头指定它。

You have to specify the port in your browser (80 is the default port) 您必须在浏览器中指定端口(默认端口为80)

Try http:\\0.0.0.0:8000\\ instead of http:\\0.0.0.0\\ 尝试使用http:\\ 0.0.0.0:8000 \\代替http:\\ 0.0.0.0 \\

我曾经更改过我的云服务器设置,并获得了访问端口7000-9000的权限,现在它可以工作了

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 python -m SimpleHTTPServer - 侦听 0.0.0.0:8000 但 http://0.0.0.0:8000/test.html 给出“找不到页面” - python -m SimpleHTTPServer - Listening on 0.0.0.0:8000 but http://0.0.0.0:8000/test.html gives "Page Not Found" 如何使用`python -m SimpleHTTPServer 8000`或`python -m CGIHTTPServer 8000`托管python cgi脚本? - How to host python cgi script with `python -m SimpleHTTPServer 8000` or `python -m CGIHTTPServer 8000`? 插座? python -m SimpleHTTPServer - Socket? python -m SimpleHTTPServer python -m SimpleHTTPServer 8000 socket.error: [Errno 98] 地址已被使用 - python -m SimpleHTTPServer 8000 socket.error: [Errno 98] Address already in use 未找到 SimpleHTTPServer python3 - SimpleHTTPServer not found python3 Python SimpleHTTPServer 404 页面 - Python SimpleHTTPServer 404 Page 带有 Gunicorn Dockerized 的 Flask 应用程序,正在侦听:http://0.0.0.0:8000,但 URL 没有响应 - Flask App with Gunicorn Dockerized, Listening at: http://0.0.0.0:8000, but URL not responding 在OSX上使用python -m SimpleHttpServer [port] - python -m SimpleHttpServer [port] on OSX Gunicorn 没有找到“memcache”模块,但是当我运行 python3 manage.py runserver 0.0.0.0:8000 时找到它 - Gunicorn isnt finding 'memcache' module but it is found when I run python3 manage.py runserver 0.0.0.0:8000 什么是“python -m SimpleHTTPServer”的 Python 3 等价物 - What is the Python 3 equivalent of “python -m SimpleHTTPServer”
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM