Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Current events
Recent changes
Random page
Help
Categories
LemonWiki共筆
Search
Search
Appearance
Log in
Personal tools
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Test connectivity for the web service
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Special pages
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== How to connect to the web service === If the service is the web server: * (1) Open the browser, (2) Type the address: {{kbd | key = <nowiki>http://127.0.0.1</nowiki> }} or {{kbd | key =<nowiki>http://the.domain</nowiki>}} * Linux lynx command: *# (optional if lynx was not installed) {{kbd | key = <nowiki>yum install lynx</nowiki>}} for CentOS / {{kbd | key = <nowiki>sudo apt-get install lynx</nowiki>}} for Ubuntu<ref>[http://www.addictivetips.com/ubuntu-linux-tips/install-and-use-lynx-on-ubuntu/ Install and Use Lynx Browser on Ubuntu]</ref> *# {{kbd | key = <nowiki>lynx http://127.0.0.1</nowiki>}} <ref>[http://lynx.isc.org/lynx2.8.7/lynx2-8-7/lynx_help/Lynx_users_guide.html Lynx Users Guide v2.8.7]</ref> for {{Linux}} * telnet command *# {{kbd | key = telnet 127.0.0.1 <PORT>}} e.g. {{kbd | key = telnet 127.0.0.1 80}} or {{kbd | key = telnet the.domain 80}} *# (after telnet-ed the web 80 port, key in) {{kbd_plus | key1 = get | key2 = SPACE}}<ref>[http://www.simplescripts.de/http-check-port-80-telnet-command.htm HTTP Check Port 80 with the Telnet Command]</ref> * curl<ref>[https://curl.se/docs/manpage.html curl - How To Use]</ref>: {{kbd | key = <nowiki>curl -vL http://IP:Port</nowiki>}} ** (optional if curl command was not installed) [https://help.ubidots.com/en/articles/2165289-learn-how-to-install-run-curl-on-windows-macosx-linux Learn how to install & run cURL on Windows/MacOSX/Linux | Ubidots Help Center] ** commands e.g. *** (1) Write output to <file> instead of stdout using {{kbd | key = <nowiki>curl -voL https://www.google.com</nowiki>}} *** (2) Write output to stdout using {{kbd | key = <nowiki>curl -vL https://www.google.com</nowiki>}} or {{kbd | key = <nowiki>curl -voL /dev/null https://www.google.com</nowiki>}} *** (3) Write output to <file> with the remote file name using {{kbd | key = <nowiki>curl -vOL https://www.google.com/index.html</nowiki>}} ** If failed. It will show the message: "failed: Connection refused" * Linux [https://www.gnu.org/software/wget/ wget] software e.g. {{kbd | key = <nowiki>wget https://www.google.com</nowiki>}} * use the third-party website monitoring the services: [[Web Ping]] If the service is not the web server, use telnet instead # (optional) [https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2008-R2-and-2008/cc771275(v=ws.10) Install Telnet Client | Microsoft Docs] on {{Win}}. [https://medium.com/@blackSource/bring-telnet-back-on-macos-high-sierra-11de98de1544 Bring telnet back on macOS high Sierra – Ayuth Mangmesap (blackSource) – Medium] on {{Mac}} # {{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 or Node.js was installed * (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>
Summary:
Please note that all contributions to LemonWiki共筆 are considered to be released under the Creative Commons Attribution-NonCommercial-ShareAlike (see
LemonWiki共筆:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)