Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

louiscox

macrumors newbie
Original poster
Nov 20, 2009
3
0
Hi

I have a very irritating problem.

I created my account username om my Mac ( OSX 10.6.2 ) long before I created my website. If we take it that my user account name happens to be 'myname' and my website happens to be http://www.myname.com. I hadn't noticed it was a problem until the other day. I changed the site base ref to work from http://myname.com away from http://www.myname.com

The problem is on my Mac, the address http://myname.com is referring to the local web server, ie pre installed Apache and library/webserver/documents not the actual web address. If Web server is switched off via the sharing control panels - the address returns a google not found page? which seems very odd. It will also do this from any user account - identical results, so I know the Mac has reserved the name in some way.

I dont want to rename my user account. I cant see my own website on my Mac which is very frustrating, as my website root is forcing all traffic to http://myname.com ( which is what I want of course ) and not http://www.myname.com. I have to use Parallels with a version of Windows to see the site properly.

Naturally I continue to search all the archives I can but to no avail - maybe Im looking in the wrong areas.

If anyone has any idea I'd be very grateful.
 
well the not found error when omitting www sounds like a configuration issue you have with your webhost. I have one and it works fine either way.

As for having OSX intercept the address thinking you want to use the local address, why not change apache to listen on port 8080 or something.
 
Thanks

The web host is definately not a problem. Ive check the site 10 fold, and its working perfectly. My browser access is only limited to my particular domain as other non www domains work fine. My Mac is at fault - no doubt of it.

Changing the port - Ill be honest, I understand coding, but Im a bit lacking in server config dept.

My understanding is that if I have web sharing off in the control panels, there is no local server running? in which case changing an Apache config file will not do much? Unless my understanding is fundamentally wrong and somehow the server is switched on permanently in some way?

If the web sharing is switched off I should be able to access any address without problems. This is definately not whats happening. What does happen is my Mac decides that the address is not reachable - when I know it is, Ive checked and re-checked.

Also the other thing that makes me suspicious of the Mac is that when I switch web server on with the control panels, the site address immediately connects to the library/webserver/documents folder - this makes me think its trying to connect to this address when the web server is switched off - hence it gives an error. It also makes me think there is a config on my Mac somewhere that needs to be pointed at localhost rather than my account name or something?
 
Problem solved

It turns out it was the hosts file

There were entries in it that were redirecting and causing the fault.

Thanks for the help
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.