Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I've just acquired an account on a remote server with Joomla installed. I was instructed to add xxx.xx.xxx.xx name.ca www.name.ca to the hosts file which I found in /private/etc/ . I had to su to my admin account and use sudo to mod file and found that hosts is also found in /etc/ though it is apparently the same file. I attempted to flush the the DNS cache using dscacheutil -flushcache and then launched Safari and entered address xxx.xx.xxx.xx/administrator but got a 404 error.

Joomla was set up for me by the server owner and accessed from his Windows laptop to demonstrate so I know it should work but no go here. Can anyone suggest what the problem might be?

share|improve this question

1 Answer 1

Are you sure that you should of gone to the IP address of the server (xxx.xx.xxx.xx/administrator) instead of a FQDN address (http://blabla.com)?

If you were told to insert items in to your host file, this is designed to translate a DNS/FQDN request to an IP Address whilst still retaining the benefits such as passing along the host header (a major factor of most shared and other hosting).

If however you actually typed the IP address as to where to go on your system, this completely bypasses the need for modifying the hosts file, and host headers will not be sent incorrectly.

For example - (I need to spend less time here and actually make a site for myself and company!) but http://www.williamhilsum.com and http://www.ezpcltd.com goes to the same IP address, and resolve to the same site - but host headers are displayed in the brackets on the second line. You can also reach the site via its IP address - http://87.194.162.98 but the server understands all host headers and can do redirecting and host individual sites. For example, for my brother, his site redirects to an entire different site http://www.edwardhilsum.com which is not accessible without the host header.

I hope you understand this.

As for why it worked for the owner, all I can say is he either was using the FQDN and not the IP or was connected via VPN or another method of resolving the domain.

Alternatively, there could be other items such as server IP restrictions, but without knowing more about the service/environment, I can't really suggest anything.

Please let me know how you get on!

share|improve this answer
    
Thank you for comment. xxx.xx.xxx.xx is on a new server but active FQDN is on another server -- IP address xx.x.xxx.xxx. The new site was made available so that I could redo friends site using Joomla. –  Kate Sep 6 '10 at 22:13
    
@Kate, I don't suppose you can rephrase that comment? I don't really understand :S –  William Hilsum Sep 6 '10 at 22:43
    
Sorry. I meant there is a site on name.ca, xx.xx.xxx.xxx, and I have another server at xxx.xx.xxx.xx on which Joomla has been installed. I simply meant to thank you for your explanation and let you know this is a new server but the site -- not built with Joomla -- is on currently active on another server. The Joomla version is yet to be built. I'm a little verbose I know. –  Kate Sep 7 '10 at 2:37
    
@ Wil, you were absolutely right but I still don't understand why name.ca works when xxx.xx.xxx.xx didn't (even before moding hosts).Thanks! –  Kate Sep 7 '10 at 10:54
    
@kate - Ok, I will try to explain the best I can - if you don't understand (or if I have understood you wrong) please rephrase... If you want further info on any point, let me know. but anyway... Every website that has a FQDN needs DNS in order to point it to a server. The point of a hosts file is to overwrite the public DNS entries. Any server (in my answer, I give an example) can understand what is typed in the browser as a FQDN (sent to server as a host header) and can produce different content based on that. so, it is possible one address produces content based on FQDN and IP, the other –  William Hilsum Sep 7 '10 at 12:40

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.