Test connectivity for the web service: Difference between revisions

Jump to navigation Jump to search
m
No edit summary
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
find the problem occurred: (1) local service at the server (localhost) (2) from LAN to server (3) from WAN to server
Find the problem occurred: (1) local service at the server (localhost) (2) from LAN to server (3) from WAN to server


: [[網路服務連線測試]] in Mandarin
{{LanguageSwitcher | content = [[Test connectivity for the web service | EN]], [[網路服務連線測試 | 漢字]] }}


=== How to connect to the web service ===
=== How to connect to the web service ===
Line 32: Line 32:
# {{kbd | key = telnet 127.0.0.1 <PORT>}} If failed to connect the web service. It will show the message: "telnet: Unable to connect to remote host: Connection refused"
# {{kbd | key = telnet 127.0.0.1 <PORT>}} If failed to connect the web service. It will show the message: "telnet: Unable to connect to remote host: Connection refused"


Using alternative web services if the Python was installed
Using alternative web services if the Python or Node.js was installed
* (for python 2.x) {{kbd | key=<nowiki>python -m SimpleHTTPServer <port></nowiki>}}<ref>[https://docs.python.org/2/library/simplehttpserver.html 20.19. SimpleHTTPServer Simple HTTP request handler — Python 2.7.17 documentation]</ref>
 
* (for python 3.x) {{kbd | key=<nowiki>python -m http.server <port></nowiki>}}<ref>[https://docs.python.org/3.8/library/http.server.html?highlight=http%20server#module-http.server http.server — HTTP servers — Python 3.8.1 documentation]</ref>
* (for python 3.x) {{kbd | key=<nowiki>python -m http.server [port]</nowiki>}} (default port: 8000)<ref>[https://docs.python.org/3.8/library/http.server.html?highlight=http%20server#module-http.server http.server — HTTP servers — Python 3.8.1 documentation]</ref>
* (for Node.js) {{kbd | key=<nowiki>npx http-server [-p port]</nowiki>}} (default port: 8080)<ref>[https://github.com/http-party/http-server http-server: a simple static HTTP server]</ref>


== Test connectivity for the local web service ==
== Test connectivity for the local web service ==
WAN &#9675; -------&gt; &#9675; LAN -------&gt; <span style="color:red">&#9679; server</span>
WAN &#9675; -------&gt; &#9675; LAN -------&gt; <span style="color:red">&#9679; server</span>


: [[Image:Owl icon.jpg]] If you has administrative permission to log into the server via SSH or Remote desktop service.
{{Tips}} If you has administrative permission to log into the server via SSH or Remote desktop service.


=== Check if your computer/server Is being assigned the IP Address ===
=== Check if your computer/server Is being assigned the IP Address ===

Navigation menu