I have set up a basic LAMP stack on a self managed VPS and now I would like to to preview the site by the IP assigned by our provider - before switching DNS over. Chrome reports the following error when trying to access the site.

I see the following in the logs:

[Mon May 28 14:06:07 2012] [notice] caught SIGTERM, shutting down 

when I try to access by the IP. The only other customisation was installing Nagios which seems to be fine - although I cannot access that by http"//MY IP/nagios either

  • Please provide the output of apache2ctl -S.
    – mgorven
    May 28, 2012 at 5:29
  • 1
    Please edit your question when providing additional information -- comments are not intended for that purpose.
    – mgorven
    May 28, 2012 at 5:37
  • What does the browser report when you try to access the site?
    – mgorven
    May 28, 2012 at 5:39
  • 1
    Is Apache actually running (ps -eF | grep apache)? Is there a firewall (iptables -nvL)? Can you connect to this IP address on a different port (e.g. SSH)?
    – mgorven
    May 28, 2012 at 5:47
  • apache running - ssh is fine
    – enkdr
    May 28, 2012 at 5:48

3 Answers 3


Add an entry to the hosts file on the client which you're testing from which maps the domain to the IP you want to test against. The hosts file is (usually) consulted before DNS, so this will override the IP configured in DNS. On *nix this file is /etc/hosts (I'm not sure offhand about other OSes.) I'm assuming that you've already configured Apache to respond for this domain.     example.com

(Remember to remove this when you actually switch DNS over so that you don't mask DNS issues.)

  • yeah - the clients ok - it is some configuration on the server I guess. I better re-phrase my question before I get down voted into oblivion - grumpy server admins? - we all have to start somewhere right!
    – enkdr
    May 28, 2012 at 5:26
  • Yup, please edit your question to clarify this.
    – mgorven
    May 28, 2012 at 5:27

Just in case anyone else finds this useful - our dedicated server came with the firewall pre-configured - port 80 was blocked. I had to make alterations IPtables.


You only need to change your host file. /etc/hosts

  • thanks - actually I may not have provided enough info - I know to change the /etc/hosts but I am getting the error because some server configuration - my question seems to be attracting down votes too!
    – enkdr
    May 28, 2012 at 5:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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