Connection refused usually means - there's nothing running on that port. A simple way to test this, is use 'telnet':
telnet localhost 80 GET / HTTP/1.0
Type the 'get' bit if the telnet connects, and hit enter twice, and that's a very basic test of 'is there a webserver here'. Chances are though - you'll get 'connection refused' as well - it's not your perl code that's at fault, but the webserver. You may need to use http://<hostname> as 'localhost' is a different interface. Or check your apache config for which port number it's using
In reply to Re: 500 Can't connect to localhost:80 (Connection Refused) at ./sample.pl line 19
by Preceptor
in thread 500 Can't connect to localhost:80 (Connection Refused) at ./sample.pl line 19
by itrik0487
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |