Apache/OS X forcing .local

Posted:
in Genius Bar edited January 2014
Hey guys,



I do all my web work on the same machine that I host the pages on. Today I was doing some web updates and normally when I check them in Safari it takes my URL and changes it to brian-mcmahons-computer.local/. Fine, since locally that would make sense, but I wanted my friend to check a certain page before I updated the site. So I sent him a link for the test portion with a directory ending (no index.html at the end). The URL changed for him to the brian.local. Then I send him another link with index.html at the end this time and it did the same thing. We are not on the same network. Does anyone know why when my server recieved this request it tried redirecting it to brian.local? Any help would be greatly appreciated. Thanks.



Brian

Comments

  • Reply 1 of 2
    It sounds like apache is automatically getting your host name, and is coming up with the .local one. You will probably want to set your hostname manually in your /etc/httpd/httpd.conf file.
  • Reply 2 of 2
    kickahakickaha Posts: 8,760member
    Or do you have caching on in Apache? It may be caching the .local version when you're on your subLAN and then handing that out as the cached version to anyone who requests.
Sign In or Register to comment.