Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have LAMP installed on a PC that is running Ubuntu 11.10. LAMP was running fine but I had to restart the PC because Unity was messing up (as it often does) and the tool bar had disappeared. When it started up, I was unable to fire up any php files. I have a file index.php in /var/www. It is owned by www-data as is the directory that it is in. The LAN address of the server is 192.168.1.10. However when I type 192.168.1.10 into the URL box on Mozilla FireFox, I get

Unable to connect      

      Firefox can't establish a connection to the server at 192.168.1.10

This server is connected to another server on the LAN that has the LAN address 192.168.1.4. When I type 192.168.1.4 into the Firefow URL box on 192.168.1.10, I see the display associated with index.php on 192.168.1.4. Why can it not display its own /var/www/index.php?

Any assistance with this would be greatly appreciated, Peter.

share|improve this question
    
On .1.10, show us the output of netstat --inet -nlp | grep :80? –  quanta Sep 25 '12 at 3:40
    
I don't get anything. Thanks. –  OtagoHarbour Sep 28 '12 at 22:43

1 Answer 1

up vote 1 down vote accepted

Make sure your web server software (Apache, I assume, since you say LAMP) is running. With Ubuntu you could run pidof apache2, then depending on the output of that, you could try starting it with service apache2 start if it is not already running. If it is running, you would need to post some log output for further troubleshooting. Apache logs are generally kept in

/var/log/apache/error_log

share|improve this answer
    
I got not out from "pidof apache2". With "service apache2 start", I got "apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName". Thanks, Pater –  OtagoHarbour Sep 29 '12 at 16:48
    
I fixed it although the fix doesn't make much sense. I made a file, /var/www/about.html on the app. server, linked to it (successfully) from the web server and then placed it with /var/www/about.php on the app. server and then linked to the php file from the web server. After that thing were working fine. I had also been tinkering with the firewall since I had been making the mistake of calling "iptables-save >iptables.save" not as root so iptables.save ended up being of zero size. So I had to adjust the firwall to accept tcp packets to and from the web server. Thanks. –  OtagoHarbour Sep 29 '12 at 21:11

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.