I just setup a new amazon ec2 instance and installed apache and setup the configs and everything but when i visit the url there is nothing....do i have the proper ports open and asscociated to apache...here is my ports..am i missing anything
sudo netstat -nap
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 1260/mysqld
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1116/sshd
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 1290/sendmail: acce
tcp 0 0 10.244.133.179:34223 207.171.163.206:80 TIME_WAIT -
tcp 0 208 10.244.133.179:22 24.172.85.150:3797 ESTABLISHED 1432/sshd: ec2-user
tcp 0 0 :::80 :::* LISTEN 1324/httpd
tcp 0 0 :::22 :::* LISTEN 1116/sshd
udp 0 0 0.0.0.0:68 0.0.0.0:* 1001/dhclient
udp 0 0 10.244.133.179:123 0.0.0.0:* 1136/ntpd
udp 0 0 127.0.0.1:123 0.0.0.0:* 1136/ntpd
udp 0 0 0.0.0.0:123 0.0.0.0:* 1136/ntpd
udp 0 0 fe80::1031:3dff:fe0:123 :::* 1136/ntpd
udp 0 0 ::1:123 :::* 1136/ntpd
udp 0 0 :::123 :::* 1136/ntpd
also running
sudo lsof -i -n -P
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
dhclient 1001 root 5u IPv4 1942 0t0 UDP *:68
sshd 1116 root 3u IPv4 2412 0t0 TCP *:22 (LISTEN)
sshd 1116 root 4u IPv6 2414 0t0 TCP *:22 (LISTEN)
ntpd 1136 ntp 16u IPv4 2497 0t0 UDP *:123
ntpd 1136 ntp 17u IPv6 2498 0t0 UDP *:123
ntpd 1136 ntp 18u IPv4 2500 0t0 UDP 127.0.0.1:123
ntpd 1136 ntp 19u IPv4 2501 0t0 UDP 10.244.133.179:123
ntpd 1136 ntp 20u IPv6 2502 0t0 UDP [::1]:123
ntpd 1136 ntp 21u IPv6 2503 0t0 UDP [fe80::1031:3dff:fe00:8249]:123
mysqld 1260 mysql 10u IPv4 2644 0t0 TCP *:3306 (LISTEN)
sendmail 1290 root 4u IPv4 2701 0t0 TCP 127.0.0.1:25 (LISTEN)
httpd 1324 root 4u IPv6 2745 0t0 TCP *:80 (LISTEN)
httpd 1403 apache 4u IPv6 2745 0t0 TCP *:80 (LISTEN)
httpd 1404 apache 4u IPv6 2745 0t0 TCP *:80 (LISTEN)
httpd 1405 apache 4u IPv6 2745 0t0 TCP *:80 (LISTEN)
httpd 1406 apache 4u IPv6 2745 0t0 TCP *:80 (LISTEN)
httpd 1407 apache 4u IPv6 2745 0t0 TCP *:80 (LISTEN)
httpd 1408 apache 4u IPv6 2745 0t0 TCP *:80 (LISTEN)
httpd 1409 apache 4u IPv6 2745 0t0 TCP *:80 (LISTEN)
httpd 1410 apache 4u IPv6 2745 0t0 TCP *:80 (LISTEN)
sshd 1432 root 3r IPv4 3313 0t0 TCP 10.244.133.179:22->24.172.85.150:3797 (ESTABLISHED)
sshd 1434 ec2-user 3u IPv4 3313 0t0 TCP 10.244.133.179:22->24.172.85.150:3797 (ESTABLISHED)
There are two points:
sudo
beforenetstat
command to be able to see the process name. See the first line afternetstat
command in your output./var/log/apache2/access.log
and/var/log/apache2/error.log
.In your
lsof
listing, I don't see any httpd process listening on the IPv4 protocol. All processes seem to be bound to IPv6 only.I'd expect to see lines similar to these in :
While lsof should show something like:
What are your
Listen
andNameVirtualHost
directives set to?Your httpd is running here. You can make sure it by telneting to the port 80 and 443. if you are on linux machine try to execute "telnet 80" then it should show as follows.
Connected to localhost. Escape character is '^]'.
which mean your httpd is listing on port 80. To troubleshoot check the access and error logs.