EDIT:
I want to telnet
into my web server on localhost
, and request my php
file from command line:
I have:
1) cd'd into the directory I want to serve, namely "/www
" (hello.php
is here)
2) run a server at directory www: python -m SimpleHTTPServer
3) telnet localhost 80
but "connection is refused". what am I doing wrong?
You're probably trying to connect to a wrong port. Check with netstat -lntp
which port is your http server listening on. The process will be listed as python/pid_number
.