I have installed webserver (apache) but I can't seem to make netcat connect to it.
$ curl localhost:80 | head
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 10701 100 10701 0 0 2230k 0 --:--:-- --:--:-- --:--:-- 2612k
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Apache2 Debian Default Page: It works</title>
<style type="text/css" media="screen">
* {
margin: 0px 0px 0px 0px;
padding: 0px 0px 0px 0px;
$ nc localhost 80
localhost [127.0.0.1] 80 (http) : Connection refused
I've also tried the same experiment with nginx before. With the same results.
I'm on debian and there's no firewall active, what am I doing wrong?