Suddenly the default website shown when going to my server IP isn't the default site (Apache-site) but rather a random domain located on the server. I'm not quite sure what caused it but I no longer get the ''Apache is functioning normally'' message when directly inputting my server IP-adress.

I've been reading up on it and it seems like a problem with a Vhost, (Please correct me if this is not how I solve the problem ) but I can't seem to locate it.

How can I fix my configuration so accessing the server by IP returns the default site?

  • Please show us your configs as there is no way to know what is going on without them in this case. – Publiccert Feb 15 '12 at 15:07
  • I am a complete noobie, any specific config file you want me to show you? – Micheal S Feb 15 '12 at 15:12
  • If you're struggling with pulling the configs you may consider moving over to 'SuperUser', they'll be willing to help you from the beginning. Serverfault is oriented towards IT professionals so you're probably not going to be getting the same type of advice. Just a thought. – Publiccert Feb 15 '12 at 15:18

If you have any virtual hosts configured, do not have one for "default" connections, and you request a site that doesn't exist on the server (by IP or any domain name there is no vhost for) you will get the first virtual host configured (order may vary depending on many things).

If you post the parts of your configuration relevant to the global site and configured virtual hosts, we may be able to help you resolve the issue.

  • Thanks for assisting me in the matter, I want to link you a config file but what config file do you want? Where is it located? i'll pastebin it if you tell me what config it is you want me to show you. – Micheal S Feb 15 '12 at 15:15
  • You didn't mention what OS you're on. Apache's HTTPD by default only reads httpd.conf (besides mime info, but we're not interested in that); but many Linux Distros make it so much more complicated, scattering the configuration around tens of files and directories. – Chris S Feb 15 '12 at 15:24
  • 1
    Apache is a Company, not software. Their most famous software is HTTPD, a web server. You're running it on some Linux distro which scatters the configuration to the wind (something I really hate, but that's beside the point here). You'll need to paste the contents of conf/extra/httpd-vhosts.conf; you may want to double check that no "sensitive" information is included before pasting. – Chris S Feb 15 '12 at 15:41
  • Regardless I've managed to fix the problem trough your help, I know i must've been a drag to deal with as I have little understanding of how HTTPD functions but atleast it all worked out in the end, I did learn alot though. The problem seemed to have come to be when somebody ( a reseller ) tried to force to transfer a domain between users by using a SSH code. – Micheal S Feb 15 '12 at 15:50

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.