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 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

share|improve this question
    
Please provide the output of apache2ctl -S. –  mgorven May 28 '12 at 5:29
1  
Please edit your question when providing additional information -- comments are not intended for that purpose. –  mgorven May 28 '12 at 5:37
    
What does the browser report when you try to access the site? –  mgorven May 28 '12 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 '12 at 5:47
    
apache running - ssh is fine –  rebelbass May 28 '12 at 5:48
show 1 more comment

3 Answers 3

up vote 2 down vote accepted

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.

1.2.3.4     example.com

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

share|improve this answer
    
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! –  rebelbass May 28 '12 at 5:26
    
Yup, please edit your question to clarify this. –  mgorven May 28 '12 at 5:27
add comment

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.

share|improve this answer
add comment

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

share|improve this answer
    
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! –  rebelbass May 28 '12 at 5:24
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.