Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have been working on getting the newest version of Ubuntu loaded on a netbook. I was able to download the utility to get the ubuntu image on a flash drive and managed to install it. However, I am having serious problems with apache on the netbook. I am sitting behind a Cisco e1200 firewall with both my "working pc" (a desktop) and "server" (the netbook) talking through it. I am able to ping either device from the other and can access the internet from both. However, when I try to load index.html from the desktop browser, I get

Unable to connect Firefox can't establish a connection to the server at localhost.

I have uninstalled and reinstalled apache three or for times with no success. I have checked and rechecked all of the config files and they all look good. However, when I run netstat -tulpn (on the desktop) I see that apache is listening to port 80 but there is not an IP address listed next to the port number.

Any help you can provide would be appreciated. Thank you.

share|improve this question
    
That is a bit of a wall of text. From what you said, apache is not running on the desktop, so, in firefox put in server_ip_address . If that does not work, are you running a firewall on the server ? –  bodhi.zazen Jan 19 '12 at 23:56
    
I submitted an edit to try to clarify which computer is running apache. Please clarify A) which computer is the server (has apache installed) and B) which computer you ran netstat -tulpn on –  Huckle Jan 20 '12 at 0:36
add comment

1 Answer 1

up vote 1 down vote accepted

From the desktop browser, you should be accessing http://netbook.ip.addr.here:80/
From the netbook browser, you should be accessing http://127.0.0.1:80/

running netstat -tulpn on the netbook should yield a line like this:

me@GAMMA:~$ sudo netstat -tulpn
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 127.0.0.1:80           0.0.0.0:*               LISTEN      1167/apache2

However running the same command on the desktop should yield nothing.

After attempting to make a connection, check the log file at /var/log/apache2/access.log and see if the access attempt made it to apache or it is being stopped by a firewall. If you see an entry in netstat for apache then it isn't likely a firewall but you never know (crazy stuff happens with iptables).

share|improve this answer
    
You do not need the ":80" , you only need to specify the port if you are not using the default. –  bodhi.zazen Jan 20 '12 at 4:50
    
Thank you to both Huckle and bodhi.zazen for your help. It was able to load the page without any additional config. So you has been working the whole time but my using localhost from the client does not work. Is localhost ONLY meant to work if I am running the server and browser client from the same box? Also, I was able to confirm php is working as well. Thank you again for your help. –  David Rasmussen Jan 20 '12 at 13:39
    
Pardon my comment about "you has been working"... I meant to say "it had been working". I typed that after a very late night and very early morning... Thanks again. –  David Rasmussen Jan 20 '12 at 13:56
    
Please mark the question as answered so it does not fall into inactive status :) –  Huckle Jan 20 '12 at 17:08
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.