Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I am having an issue I cannot seem to resolve. I am being refused only on port 80. However port 8080, and 22 (Tomcat and ssh) are available. I am pretty sure this is not an Apache thing, however I cannot be 100%. Temporarily I have disabled firewall to eliminate that via sudo ufw disable. Here are some of my outputs:

sudo iptables -L -n

Chain INPUT (policy ACCEPT)
target     prot opt source               destination         

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination 

netstat -nao | grep 80

tcp6       0      0 :::8080                 :::*                    LISTEN      off (0.00/0/0)
tcp6       0      0 127.0.0.1:8005          :::*                    LISTEN      off (0.00/0/0)
unix  3      [ ]         STREAM     CONNECTED     8180     

netstat | less

Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State      
tcp        0     48 xx.xxx.xxx.102:ssh      67.xxx.xxx.4.ptr.:40726 ESTABLISHED
Active UNIX domain sockets (w/o servers)
Proto RefCnt Flags       Type       State         I-Node   Path
unix  5      [ ]         DGRAM                    7416     /dev/log
unix  3      [ ]         STREAM     CONNECTED     8181     
unix  3      [ ]         STREAM     CONNECTED     8180     
unix  2      [ ]         DGRAM                    10399    
unix  2      [ ]         DGRAM                    6992     
unix  3      [ ]         STREAM     CONNECTED     6959     /var/run/dbus/system_bus_socket
unix  3      [ ]         STREAM     CONNECTED     6958     
unix  2      [ ]         DGRAM                    8942     
unix  3      [ ]         STREAM     CONNECTED     6870     @/com/ubuntu/upstart
unix  3      [ ]         STREAM     CONNECTED     9273     
unix  3      [ ]         STREAM     CONNECTED     8603     /var/run/dbus/system_bus_socket
unix  3      [ ]         STREAM     CONNECTED     8602     
unix  3      [ ]         STREAM     CONNECTED     6754     
unix  3      [ ]         STREAM     CONNECTED     6753     
unix  3      [ ]         DGRAM                    8452     
unix  3      [ ]         DGRAM                    8451     
unix  3      [ ]         STREAM     CONNECTED     8418     @/com/ubuntu/upstart
unix  3      [ ]         STREAM     CONNECTED     8415 

I even went so far as to purge and remove apache2 ... In hopes it would reset the listening on port 80. I really have no idea where else to go .. Does anyone have any suggestions where to look next?

EDIT

OK .. So Apache is not starting .. Now to figure out why .. /var/log/apach2/error.log shows no errors since last server reboot, and here is the result of configtest

sudo apachectl configtest

Syntax OK
share|improve this question
    
Are you sure apache was running? ps aux | grep apache or service apache2 status –  Gert Aug 7 '13 at 16:46
    
Good call .. Apache is NOT running .. However logs don't show any errors on startup?! Will update question above with pertinent info .. –  Zak Aug 7 '13 at 16:55
    
Did you try starting it manually? service httpd start. –  slm Aug 7 '13 at 17:14
    
Of course .. * Starting web server apache2 ... However the return of service apache2 status is Apache2 is NOT running. –  Zak Aug 7 '13 at 17:19
    
That's sudo service httpd start, right? –  slm Aug 7 '13 at 23:11
show 1 more comment

1 Answer

You could try debugging Apache as it starts up with the following command:

$ sudo strace -Ff apachectl start

You could also do this:

$ sudo strace -Ff service httpd start

To catch the output to a log file:

$ sudo strace -Ff service httpd start 2>&1 | tee apache_$(date +%F_%T).log
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.